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.


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

Results 1 to 4 of 4

Thread: How do I create a most basic java timer ?

  1. #1
    Junior Member
    Join Date
    Nov 2012
    My Mood
    Thanked 1 Time in 1 Post

    Default How do I create a most basic java timer ?

    Hello every one i would just like to know how to create the most basic java timer. Ive searched on Google and you tube and i cannot get a good answer or even worse example on how its done if you would be so kind to teach me I would be so grateful.

    The main problem would be i do not know the parameters the constructor requires.


  2. #2
    Administrator Norm's Avatar
    Join Date
    May 2010
    Eastern Florida
    Thanked 2,645 Times in 2,615 Posts

    Default Re: How do I create a most basic java timer ?

    There already are Timer classes in Java SE. Have you looked at them?
    Here's the link to the API doc:

  3. #3
    Elite Member curmudgeon's Avatar
    Join Date
    Aug 2012
    My Mood
    Thanked 139 Times in 134 Posts

    Default Re: How do I create a most basic java timer ?

    Yes, as Norm states, there are several Timer classes available. What you first must do is figure out the requirements for your project, then break it down into separate steps and then solve each step one at a time. When/if you get stuck at a step, come back here with your code and question, and we can usually help.

  4. #4

    Default Re: How do I create a most basic java timer ?

    The Java language libraries include a "swing timer", which lets you add a countdown timer on your Java forms. You set up the timer's properties such as the amount of time that passes before a function triggers. The timer continually runs, so you can trigger a function continuously in your application. Each time the countdown time is reached, the function runs and you reset the timer countdown to start over.

Similar Threads

  1. How to Use Timer in Java
    By neo_2010 in forum Java SE API Tutorials
    Replies: 2
    Last Post: August 6th, 2013, 09:49 AM
  2. Get Java input on a timer
    By johnsmith1992 in forum Threads
    Replies: 6
    Last Post: December 19th, 2011, 06:09 PM
  3. How to create timer control in java?
    By Subhasri in forum AWT / Java Swing
    Replies: 1
    Last Post: September 27th, 2011, 12:08 AM
  4. 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