• Post Reply Bookmark Topic Watch Topic
  • New Topic

Countdown clock  RSS feed

 
Ana Reyes
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how can you add a feature where the user can input the time for the clock to countdown to?
 
Tony Docherty
Bartender
Posts: 3271
82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you be more specific. Do you mean the system clock, do you mean take the difference between the time entered and the 'clock' in seconds (or some other unit of time) and count this number down or do you mean something else altogether.
 
Mauro Trevigno
Ranch Hand
Posts: 99
Java Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Time to the clock, a specific time in hours or just any hours, seconds, etc?

Are you looking a timer?

Check it out these two classes:
java.util.Timer;
java.util.TimerTask;
 
Paul Clapham
Sheriff
Posts: 22844
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How you ask the user to input something depends very much on how the user interacts with the rest of your application. You asked about "add a feature" so you must already have an application, so how does the user work with it? Does it have a GUI? Or does it use the command line? Or maybe it's a web application?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!