Results 1 to 3 of 3

Thread: Help with Pause

  1. #1
    trill is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default Help with Pause

    Hi, I am making an 8-Ball applet and I want to make the 8-Ball pause before it is redrawn in a different location.

    How do you make a program pause for a set amount of time before completing the next action in the code?
    Thanks.

  2. #2
    zoe
    zoe is offline Member
    Join Date
    Jul 2007
    Posts
    40
    Rep Power
    0

    Default

    You need to look into threading, and in particular the Thread.sleep() method. This is a standard java class.

  3. #3
    marco is offline Member
    Join Date
    Jul 2007
    Posts
    23
    Rep Power
    0

    Default

    if you want a certain button could start a loop which never ends, and another button could break the loop

    if (//button sequence)
    while (true)
    {
    if (//button sequence)
    break;
    }

Posting Permissions

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