Write a GUI program that uses the methods in the Graphics class together with threads to draw a smiley face, wait two seconds, draw a frowny face, wait two seconds, and repeat starting with the smiley face. A separate thread should be started to implement the two-second timer. The application should be responsive and exit immediately if the user decides to close the window.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.