This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Java Timer Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Timer" Watch "Java Timer" New topic

Java Timer

Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492

I need to start the timer from zero. Some please assist me

The new Date is starting it from System Date.

Rob Spoor

Joined: Oct 27, 2005
Posts: 19656

Check out the methods in javax.swing.Timer. There are two that can set two different delays. Call one of those.

How To Ask Questions How To Answer Questions
doruk turkoglu

Joined: May 22, 2009
Posts: 4
i really cant get question fully but if you want to display a date-time thing in panel or whatelse and want to start it from 0 (is it 01.01.2000 00:00) you should set time of your date with Date constructor
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 38107
Check the API, but I think "0" means 1st January 1970.
Meet Gaurav
Ranch Hand

Joined: Oct 08, 2008
Posts: 492
This helps me.. thanks for all your reply

This will starts with 1 hr and ends with 0(I mean after 1 Hr). Reverse timer

I agree. Here's the link:
subject: Java Timer
Similar Threads
Timer & TimerTask - Name of Timer Object
Need to restart timer with different time
ejb as abstract ?
controlling ejbTimeout EJB 2.1
Duplicate Timers in JBOSS