This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Swing / AWT / SWT and the fly likes How modal is too modal? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How modal is too modal?" Watch "How modal is too modal?" New topic
Author

How modal is too modal?

Nicholas George
Greenhorn

Joined: Feb 19, 2004
Posts: 9
So I want to have a JDialog whose job is to connect to an external device. While the dialog is up, the application should be stuck on the dialog. This I understand to be 'modal.' The problem is that my modal dialog is even blocking itself out of doing anything. The Code:



It prints "1", but doesn't print "2" until the dialog is closed. How do I make it so the connect dialog is locked as the enabled window, but without locking itself out?

Edit: It occurs to me that this might just not be the job of a dialog. Can I make a JFrame that will be 'modal' as I understand the word?
[ June 06, 2008: Message edited by: Nicholas George ]
Nicholas George
Greenhorn

Joined: Feb 19, 2004
Posts: 9
Figured this one out. Just have to handle things with events...
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How modal is too modal?