Results 1 to 2 of 2
- 03-23-2009, 09:49 AM #1
Member
- Join Date
- Mar 2009
- Posts
- 1
- Rep Power
- 0
an old question about Thread.Sleep()
Hello guys,
I know this is an old question to ask, but I am a beginner in Java. I codded a small program in JFrame and I used Thread.Sleep() to give delay, but obviously the window of my program freezes until the job is done and then shows the result, but I do not want it like that! I want my window to become active again after delay.
I used this code:
try
{Thread.sleep(500);
}
catch (InterruptedException e){};
Can you please tell me, how to keep my window active?
Thank you in advance :D
- 03-25-2009, 07:12 AM #2
Member
- Join Date
- Mar 2009
- Posts
- 42
- Rep Power
- 0
Similar Threads
-
Difference between Thread.yield() and Thread.sleep() methods
By Nageswara Rao Mothukuri in forum New To JavaReplies: 12Last Post: 07-30-2010, 05:37 PM -
Thread.sleep() question
By Lachezar in forum New To JavaReplies: 5Last Post: 02-03-2009, 10:27 PM -
Sleep in thread
By jithan in forum New To JavaReplies: 1Last Post: 08-27-2008, 02:27 PM -
Can't get my thread to sleep!
By jamesfrize in forum New To JavaReplies: 2Last Post: 03-25-2008, 05:14 AM -
How to use the sleep and thread?
By jiuhu in forum Java AppletsReplies: 4Last Post: 08-07-2007, 02:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks