Results 1 to 5 of 5
  1. #1
    Prime624 is offline Member
    Join Date
    Feb 2013
    Location
    San Diego
    Posts
    96
    Rep Power
    0

    Default Wait method in GUIs

    How do I make the program wait for n seconds then continue. I have searched this many times and the techniques only work in the main method. I need mine to work in GUIs. Very simple terms please, I'm very new to this.

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,037
    Rep Power
    10

    Default Re: Wait method in GUIs

    Check out javax.swing.Timer.
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Prime624 is offline Member
    Join Date
    Feb 2013
    Location
    San Diego
    Posts
    96
    Rep Power
    0

    Default Re: Wait method in GUIs

    How can I use that to do it?

  4. #4
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,037
    Rep Power
    10

    Default Re: Wait method in GUIs

    Quote Originally Posted by Prime624 View Post
    How can I use that to do it?
    What have you tried? Did you read the tutorial that fast?

    How to Use Swing Timers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  5. #5
    Prime624 is offline Member
    Join Date
    Feb 2013
    Location
    San Diego
    Posts
    96
    Rep Power
    0

    Default Re: Wait method in GUIs

    Think I got it now. I did not read the official tutorial but I used them a bit in my animation experimentation. Thanks.

Similar Threads

  1. wait until method is finished
    By 3.14.TR in forum Threads and Synchronization
    Replies: 4
    Last Post: 12-04-2012, 10:28 PM
  2. wait() and notify() + synchronized method
    By pEkvo in forum Threads and Synchronization
    Replies: 9
    Last Post: 12-29-2011, 10:29 PM
  3. WAIT method question
    By alexalex1234 in forum Threads and Synchronization
    Replies: 1
    Last Post: 03-14-2011, 12:37 PM
  4. Wait method and sleep method
    By chathura87 in forum New To Java
    Replies: 3
    Last Post: 03-01-2011, 06:04 PM
  5. Why would a String class need a wait() method?
    By javanb in forum New To Java
    Replies: 8
    Last Post: 12-06-2010, 02:36 PM

Posting Permissions

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