wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes JOption Pane dead Lock Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOption Pane dead Lock " Watch "JOption Pane dead Lock " New topic
Author

JOption Pane dead Lock

Bhagya Tangutur
Ranch Hand

Joined: Oct 21, 2002
Posts: 88
What is the Best way to show OptionPane in Multi Threaded Environment.
why I am pointing about Multi Threaded Environment is,Any thread can show Message in OptionPane.So some times there is chance of dead Lock.


Sun Certified Java Programmer
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
http://java.sun.com/docs/books/tutorial/uiswing/overview/threads.html
It needs to be done in the event handling thread. If you need to call this from another thread you can create a Runnable and pass it to invokeLater.
Bhagya Tangutur
Ranch Hand

Joined: Oct 21, 2002
Posts: 88
Ken,
That's perfect.It works great now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOption Pane dead Lock
 
Similar Threads
Sort Arraylist by passing runtime parameter
String and StringBuffer
Multiple lock requests on the same record number
Helper - Singleton or Static?
where we need ConcurrentHashMap ?????