• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JOptionPane question

 
Satheesh Thekku Veethil
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Geeks,
I have a situation here.
I have an application which is made up of two process. Each process displays a JFrame which has user interface components in them.
Now I have an issue in displaying a modal popup. I used a JOptionPane which takes the parent frame as its containter. In which case it is modal with respect to that specific parent frame.
Obviously I cannot make it modal with respect to the second frame (from the second process). So what as a solution is to restrict the motion (the user dragging the popup) to the parent frame only.
Any suggestions as to how I can achieve this?
Any ideas or any other suggestions for getting a modal popup across the two frames??
Please reply asap
Regards
Sat
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the secret to getting a dialog (I assume that you meant dialog instead of popup... Popups aren't modal... ) to be modal across two frames... use dialogs instead!

Here's some code that illustrates this...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic