By defining ONE class that has references to ALL the parts and data needed to display the clock.
One of the fields in the class would be a reference to the text field.
Having the data in separate...
Type: Posts; User: Norm
By defining ONE class that has references to ALL the parts and data needed to display the clock.
One of the fields in the class would be a reference to the text field.
Having the data in separate...
What are the 3 arraylists for? Could the data they contain be held in one class and instances of that class placed in a single arraylist?
The posted code still is creating a new arraylist every...
Create a class to hold all the data for a time display. Put instances of that class in a collection/list so it can be used to update the time and anything else about the display.
This is strange. Why use an array here:
clockDisplay = new JPanel[1];
The lists need to be created BEFORE the action listener method is called so the new times can be saved in it.
...
There needs to be a list of the labels to be updated. The current code has a single reference to a label to be updated.
How are each of the clock's displays handled so that each can be updated?
I expect to see a collection of some kind where the displays are saved so that the timer can go through the displays saved...
Ok, no hurry. I'll wait.
Do you have a main() method for testing the code?