Results 1 to 2 of 2
  1. #1
    Sebasnr is offline Member
    Join Date
    Dec 2011
    Rep Power

    Question Problem 'sleeping' Threads

    Hi guys, I'm trying to do a tiny spaceship game, but the problem is I want to sleep an enemy, but with the method sleep(int milliseconds) from Thread, it sleeps the "AWT-EventQueue-0" Thread (I do implement the MouseListener and MouseMotionListener Interfaces for move the spaceship). So, how can I sleep the enemy Thread instead the EventQueue?

    Thanks and sorry for my bad english.

  2. #2
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    New Zealand
    Rep Power

    Default Re: Problem 'sleeping' Threads

    This is a duplicate thread - as in thread in the forum, I mean. I'll close and move jammas615's post.

Similar Threads

  1. Problem 'sleeping' Threads
    By Sebasnr in forum New To Java
    Replies: 6
    Last Post: 12-31-2011, 06:48 PM
  2. Problem running many Threads !!
    By AlQassabi in forum Threads and Synchronization
    Replies: 10
    Last Post: 03-04-2011, 11:29 AM
  3. interrupt sleeping thread by mouse action
    By BigBear in forum AWT / Swing
    Replies: 5
    Last Post: 08-12-2010, 11:10 PM
  4. How to stop thread when it is sleeping
    By luoluo in forum Threads and Synchronization
    Replies: 2
    Last Post: 04-24-2010, 04:09 AM
  5. problem with threads
    By amith in forum Threads and Synchronization
    Replies: 4
    Last Post: 07-10-2008, 08:46 AM

Tags for this Thread

Posting Permissions

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