Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog on JDialog

 
Rachel Swailes
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 434
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic