lol that was funny! The Timer class is definitely the way to go. And since the Timer class uses ActionEvents, the way the count down is displayed is controlled by you (that is, the ActionEvent can be to simply repaint() the updated time).
Hmmm, and what if you wanted an automatic action to be taken at the end of the count down? Would it be easier to create a new Timer that has an update interval of the count down duration - with the appropriate action event set; or would it be better to add an ActionEvent to the existing Timer and perform the check? I didn't read the tutorial so I'm not sure if the answer is there but this sounds so familiar - I feel I've programmed it before... ah but in C# Oops did I just ramble? lol
Oh, 1 last thing, the Timer class can also be found in java.util.Timer just btw
I know i should have mention this from beginning but am a newbie in programming java applet so am using a book "Java How To Program 7ED" to guide me to program a game project so i was wondering if there any resources like tutorial links on how to do a countdown timer for a game i will appreciate it because i barely understand what you guys are talking about xD
The amount of time allotted for the game is something you would set in your program. You use the timer to subtract a certain amount of time from your game time when it fires. So if you start with say 60 seconds and use the timer to subtract 1 from that every second (1000ms timer interval), you simply display the remainder in your applet.
Edit: That's not going to give you a fine-grained timer due to scheduling updates on the AWT thread, but it's close enough for your purposes.