Countdown

Discussion in 'Java' started by vasilis, Aug 23, 2004.

  1. vasilis

    vasilis Guest

    Hi all

    I have created a java applet that demonstrates an online test. However
    I don’t know how I can add a countdown timer that will end the
    test in 40 minutes. Could you please give me some guidelines or a link
    to a source because I’m a beginner and it seems very difficult
    till now. I don’t want a counter that will use images to display
    the digits. It will be ok if I can display it simply in a jtextfield
    area.


    thanks
    vasilis, Aug 23, 2004
    #1
    1. Advertising

  2. On 23 Aug 2004 07:11:04 -0700, vasilis wrote:

    > I have created a java applet that demonstrates an online test. However
    > I don’t know how I can add a countdown timer that will end the
    > test in 40 minutes.


    <meta http-equiv="refresh" content="2400;URL=timeout.html">
    ...is one (crude) way. ;-)

    >...Could you please give me some guidelines or a link
    > to a source because I’m a beginner and it seems very difficult
    > till now.


    It sounds you need a different group
    for the moment..
    <http://www.physci.org/codes/javafaq.jsp#cljh>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Aug 23, 2004
    #2
    1. Advertising

  3. vasilis

    Nick Pomfret Guest

    You could try a timer task:

    int fourtyMins = 1000 * 60 * 40;

    Timer timer = new Timer();
    timer.schedule(new TimerTask() {
    public void run() {
    //insert your code here - but beware your running in a
    different thread now
    System.out.println("times up!");
    }
    }, fourtyMins);


    --
    Java pivot tables
    http://www.tabletoolkit.com

    "vasilis" <> wrote in message
    news:...
    > Hi all
    >
    > I have created a java applet that demonstrates an online test. However
    > I don’t know how I can add a countdown timer that will end the
    > test in 40 minutes. Could you please give me some guidelines or a link
    > to a source because I’m a beginner and it seems very difficult
    > till now. I don’t want a counter that will use images to display
    > the digits. It will be ok if I can display it simply in a jtextfield
    > area.
    >
    >
    > thanks
    Nick Pomfret, Aug 23, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ryan Stewart

    GUI countdown timer in a JApplet?

    Ryan Stewart, Dec 23, 2003, in forum: Java
    Replies:
    2
    Views:
    849
  2. Replies:
    5
    Views:
    568
    Andrew Thompson
    Nov 30, 2004
  3. JSP countdown timer

    , Nov 1, 2005, in forum: Java
    Replies:
    4
    Views:
    14,737
  4. Simon Brunning

    Re: Python Countdown

    Simon Brunning, Nov 11, 2005, in forum: Python
    Replies:
    0
    Views:
    462
    Simon Brunning
    Nov 11, 2005
  5. Simon Brunning

    Re: Python Countdown

    Simon Brunning, Nov 11, 2005, in forum: Python
    Replies:
    0
    Views:
    614
    Simon Brunning
    Nov 11, 2005
Loading...

Share This Page