aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JOptionPane modal for only one window. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JOptionPane modal for only one window." Watch "JOptionPane modal for only one window." New topic
Author

JOptionPane modal for only one window.

Karthick Dharani Vidhya
Ranch Hand

Joined: Feb 23, 2008
Posts: 89
Hi,

In my application, I have a MAIN FRAME. I bring up a non-modal dialog whose parent will be this MAIN FRAME. When user performs a operation on this dialog and if it is not valid then one JOptionDialog is shown that will have the error message and a 'OK' button. This OptionPanes's parent is set to Dialog.

Now this JOptionPane blocks the input for the whole Application. If i want to block the input only for the Dialog. How do we do it?


Karthick D V
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
Dialog Modality
Steven Wall
Greenhorn

Joined: Nov 04, 2007
Posts: 22
We have been interested in this issue too, so I was anxious to see the response. As far as I can tell, the JDialog constructors only allow a JFrame or Window as it's "owner", so they cannot be used with JInternalFrame as a parent.


SCJP, SCWCD
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JOptionPane modal for only one window.