jQuery in Action, 2nd edition
The moose likes Swing / AWT / SWT / JFace and the fly likes Time Control Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "Time Control" Watch "Time Control" New topic
Author

Time Control

Nischal Topno
Ranch Hand

Joined: Nov 24, 2001
Posts: 45
I have been trying to locate a time control (that will show the HH:MM:SS AM/PM) to use with my java programs. Anyone aware of any control like this.
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4120

The easiest way to make one yourself ( if you can't find one floating around the 'net ) would be to extends JLabel that uses a thread to continually refresh and display the current time. You can get the current time by using System.currentTimeMillis(), and then format it using the SimpleDateFormat class...

-Nate


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
 
subject: Time Control
 
Threads others viewed
WA #1.....word association
Control Search: Kindly Help
TripleDES
implicit objects in jsp
C++ vs Java Concurrency performance
WebSphere development made easy
without the weight of IBM tools
http://www.myeclipseide.com