Implement a GUI program that acts as a time display. The program should print the current time when the user clicks on a button within the application. The program should also change the background of the GUI each time the user clicks. A minimum of four colors should be used.

Hint: The following code prints the current time.
Date now = new Date();
System.out.println(now);
The Date class is in the java.util package.
Your program should only display the current time in the following format:
HH:MM:SS

Leave a Reply

Your email address will not be published. Required fields are marked *

Implement a GUI program that acts as a time display. The program should print the current time when the user clicks on a button within the application. The program should also change the background of the GUI each time the user clicks. A minimum of four colors should be used.

Hint: The following code prints the current time.
Date now = new Date();
System.out.println(now);
The Date class is in the java.util package.
Your program should only display the current time in the following format:
HH:MM:SS

Leave a Reply

Your email address will not be published. Required fields are marked *