aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JDialog on JDialog Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JDialog on JDialog" Watch "JDialog on JDialog" New topic
Author

JDialog on JDialog

Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
Hi there!

When my application loads, I show a modal JDialog. Then when I click a button on that JDialog, I want to show another dialog. But for some reason, when the first dialog is modal, the second dialog won't show at all. The first dialog has to be non modal for the second to show.

Here is the code where I am trying to show the second dialog.





Any suggestions would be greatly appreciated.

Many kind regards,
Rachel
Arthur Griffith
Greenhorn

Joined: Jan 06, 2005
Posts: 6
When a window is being displayed, and that window is modal, you can't do anything else. It has complete control of the windows and the mouse and no other window can get it. You can't have two modal windows at once because only one can have this control. I understand what you are trying to do, and it makes sense, but I think you have run afowl of the laws of modality.
Rachel Swailes
Ranch Hand

Joined: May 18, 2004
Posts: 434
I guess that kind of makes sense. It just seems silly that I can't have a modal dialog generate another modal dialog.

Cheers,
Rachel
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDialog on JDialog