This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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 Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOption Pane dead Lock " Watch "JOption Pane dead Lock " New topic

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
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
That's perfect.It works great now.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JOption Pane dead Lock
It's not a secret anymore!