Results 1 to 2 of 2
  1. #1
    parthvolde is offline Member
    Join Date
    Apr 2011
    Posts
    1
    Rep Power
    0

    Lightbulb JFrame With Having a Timer

    Pls help me with timer in my JFrame.
    All i need is a timer thing which shows remaining time i.e 09:59 and goes to 00:00 as in stop watch and when the remaining time is 00:00 i want some action to be performed.
    Tried all timer things googled but didnt help..

  2. #2
    ra4king's Avatar
    ra4king is offline Senior Member
    Join Date
    Apr 2011
    Location
    Atlanta, Georgia, US
    Posts
    396
    Rep Power
    4

    Default

    Try using the Swing Timer (javax.swing.Timer). Set it to 1000 (milliseconds) and with each tick, set the current time in the JLabel that you add to the JFrame.

Similar Threads

  1. Timer not ticking in GUI edited JFrame
    By BiteMuncher in forum New To Java
    Replies: 13
    Last Post: 04-20-2011, 02:50 AM
  2. Stopping a Timer from Inside the timer
    By krishnan in forum Java Applets
    Replies: 2
    Last Post: 10-05-2010, 12:15 AM
  3. Replies: 5
    Last Post: 06-14-2010, 07:10 PM
  4. Replies: 4
    Last Post: 04-23-2009, 12:02 AM
  5. Replies: 0
    Last Post: 04-04-2008, 03:46 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •