• Post Reply Bookmark Topic Watch Topic
  • New Topic

Time Control  RSS feed

 
Nischal Topno
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!