File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Display running time in JLabel Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Display running time in JLabel" Watch "Display running time in JLabel" New topic
Author

Display running time in JLabel

Jennifer Sohl
Ranch Hand

Joined: Feb 28, 2001
Posts: 455
I need to display the running time (Only need HH:MM) in a JLabel for one of our apps. The time I need to display is the time from our database. I am getting the time from our DB with a stored procedure. I could just go out to the DB every minute and get the time, but that seems very inefficient, doesn't it?

Is there any other way to accomplish this?



Thanks for any help!
Avi Abrami
Ranch Hand

Joined: Oct 11, 2000
Posts: 1131

Jennifer,
Allow me to suggest the javax.swing.Timer class.

Good Luck,
Avi.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display running time in JLabel