File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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: 19845

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: 40436
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

Don't get me started about those stupid light bulbs.
subject: Java Timer