|
-
May 12th, 2000, 05:11 PM
#1
Thread Situation
I'm using the JDK 1.0.2 to create applets that all browsers can run. What I need to do is open a dialog box and have the current thread wait until the dialog box closes. The dialog box requires input before it closes.
My real problem is that the current thread happens to be the AWT event handler thread. So if I try any wait()ing or notify()ing or suspend()ing, then it will lock up the thread and there will be no way of receiving any input.
Simply put, how can I do this without affecting the AWT thread?
Thanks.
-
May 19th, 2000, 01:53 PM
#2
Re: Thread Situation
You need to implement a "Worker" thread. See this tutorial
http://web2.java.sun.com/docs/books/...c/threads.html
It's more about the newer versions of Swing, but the concept will be the same for you.
Basically, you need a separate thread to control your application. This will free up the AWT thread to continue painting and handling input.
Good luck!
-
May 24th, 2000, 02:41 PM
#3
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|