Modifying JLabel within separate class
I have been searching the net for an answer with no answer found.
Basically, I am trying to display a chronometer by displaying it on a JLabel which is on a JFrame.
I have a JFrame class named TimerFrame, and a separate class Timer, which holds all the methods and variables needed for the chronometer.
The GUI has two buttons, start/stop and lap/reset and a JLabel which displays the current time.
I want a method to update the JLabel so to constantly display the current time (chronometer) and to stop when the user presses stop.
The place where I am stuck, is how to constantly update the JLabel from within the Timer Class. A thread is running but the access to the JLabel is unclear.
Please help out, I don't need code just an explanation on how to access the TimerFrame from another class.
Thanks in advance.