This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv 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 REST with Spring (video course) this week in the Spring 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 agree. Here's the link:
subject: JOption Pane dead Lock
It's not a secret anymore!