Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JOption Pane dead Lock

 
Bhagya Tangutur
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ken Blair
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ken,
That's perfect.It works great now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic