Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Java count up timer

  1. #1
    Member
    Join Date
    Sep 2012
    Location
    Philippines
    Posts
    46
    My Mood
    Cheeky
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Java count up timer

    Can someone give me an idea on how to do a count up timer in java? like "0:00:00" hh:mm:ss


  2. #2
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java count up timer

    Graphical or console? Either can be done with a Timer, but the graphical case (a Swing app) should use a javax.swing.Timer.

  3. #3
    Member
    Join Date
    Sep 2012
    Location
    Philippines
    Posts
    46
    My Mood
    Cheeky
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Default Re: Java count up timer

    Capture.JPG Here is my sample interface so i guess it's graphical. Is there a tut for Timer for java? it's the first time id heard of it.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: Java count up timer

    There is a tutorial for most everything in Java somewhere on the web. Not all of them are good, however. A good place to start is with the Oracle tutorials, like this one on the Timer. You might also be interested in the main index for Swing tutorials, since I'm not sure what your experience level with Swing is. I recommend you ignore Oracle's suggestion to use Netbeans with the GUIBuilder and learn to code Swing by hand. (Using Netbeans without the GUIBuilder is fine.)

Similar Threads

  1. how to count occurance of numbers using java arrays
    By muhammad waqar in forum What's Wrong With My Code?
    Replies: 1
    Last Post: January 1st, 2013, 04:59 PM
  2. Column count doesn't match value count at row 1
    By Tyluur in forum What's Wrong With My Code?
    Replies: 1
    Last Post: December 30th, 2012, 01:31 AM
  3. How to Use Timer in Java
    By neo_2010 in forum Java Code Snippets and Tutorials
    Replies: 0
    Last Post: September 1st, 2009, 12:10 PM
  4. How to Use Timer in Java
    By neo_2010 in forum Java Programming Tutorials
    Replies: 0
    Last Post: September 1st, 2009, 12:10 PM
  5. Creating A Count Matrix In Java
    By statsman5 in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: July 14th, 2009, 04:40 PM