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 modeless dialogs in swing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "modeless dialogs in swing" Watch "modeless dialogs in swing" New topic
Author

modeless dialogs in swing

dharini thyagaraj
Greenhorn

Joined: Jan 24, 2001
Posts: 13
Hi,
Text books talk only about modal dialog in swing. Is there any way to create a modeless dialog?
thanks in advance and best regards,
dharini
deekasha gunwant
Ranch Hand

Joined: May 06, 2000
Posts: 396
Hi dharini,
you can have both modal and non modal dialogs in swing.
JDialog defines following constructors.
------------------------

JDialog()
Creates a non-modal dialog without a title and without a specified Frame owner.
JDialog(Dialog owner)
Creates a non-modal dialog without a title with the specifed Dialog as its owner.
JDialog(Dialog owner, boolean modal)
Creates a modal or non-modal dialog without a title and with the specified owner dialog.
JDialog(Dialog owner, String title)
Creates a non-modal dialog with the specified title and with the specified owner dialog.
JDialog(Dialog owner, String title, boolean modal) Creates a modal or non-modal dialog with the specified title and the specified owner frame.

-------------------------
In first two and fourth constructors the created dialog is non modal .while in rest of the constructors u can pass true/false depending on whether u want your dialog to be modal/nonmodal.
hope it helps
regards
deeksha

[This message has been edited by deekasha gunwant (edited February 06, 2001).]
dharini thyagaraj
Greenhorn

Joined: Jan 24, 2001
Posts: 13
Thank you very much Deeksha!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: modeless dialogs in swing