Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: counting down in java
09-08-2010, 01:46 PM #1
- Join Date
- Sep 2010
- Thanked 0 Times in 0 Posts
counting down in java
it would be for a library reservation system. this would be put on the computers with sessions from 15 minutes to 2 hours (in 15 minute chunks i.e, 15, 30, 45, 1 hour).
this program would countdown the remaining time on their session, with pop-up messages appearing every so often.
at the end of the session, the program will have to automatically log the user off.
any tips would be appreciated, thanks
09-08-2010, 02:27 PM #2
- Join Date
- Sep 2002
- Saskatoon, Saskatchewan
- Thanked 2,662 Times in 2,631 Posts
Look at the Timer: http://download.oracle.com/javase/1....til/Timer.html which includes a schedule and allows you to execute a TimerTask every x milliseconds.
The TimerTask itself will need to be extended and overridden, and runs as a thread, so the run() must be overridden to take care of the task you want (such as a JDialog).
Been gone for a few months, and haven't programmed in that long of a time. Meh, I'll wing it ;)PHP Code:
header('HTTP/1.1 420 Enhance Your Calm');