I'm new to Java and I'm taking grade 11 computer science. For our final project, we have to make a game and I'm doing JEOPARDY. When you click on the question you want, a new form comes up showing that questions and the 4 choices for the answer (I'm doing multiple choice for simplicity) On that form, I want there to be a countdown from 20 to 0. Once the timer runs out, I want the form to close. The user needs to be able to see the timer.
Asked
Active
Viewed 284 times
0
-
possible duplicate of [how to make a countdown timer in java](http://stackoverflow.com/questions/14393423/how-to-make-a-countdown-timer-in-java) – But I'm Not A Wrapper Class Jan 27 '14 at 22:18
1 Answers
0
I would recommend creating a class that extends JPanel and implements ActionListener, and using the Timer class. A Timer will periodically fire events (for example, once per second) which you can respond to (update the UI or close the form) in the actionPerformed method.

Nathan
- 2,093
- 3
- 20
- 33