File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JOptionPane question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane question" Watch "JOptionPane question" New topic
Author

JOptionPane question

Satheesh Thekku Veethil
Greenhorn

Joined: Jan 31, 2002
Posts: 25
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

Joined: Oct 18, 2000
Posts: 4121

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...


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane question
 
Similar Threads
Have a Swing JMenuBar diasppear in the initial frame
JFrame or JDialog
JOptionPane modal for only one window.
popup window changed to internal iframe. problem using window.opener
Modal dialog for a popup