Hello, I have created one GUI in which I have used a JFrame. How should I make it Modal?
+3
A:
Your best bet is to use a JDialog instead of a JFrame if you want to make the window modal. Check out the Modality API for details.
akf
2009-09-26 15:13:50
A:
As far as I know, JFrame cannot do Modal mode. Use JDialog instead and call setModalityType(Dialog.ModalityType type)
to set it to be model (or not a modal).
NawaMan
2009-09-26 15:14:05
A:
This should help you:
http://www.javareference.com/jrexamples/viewexample.jsp?id=44
Althought if possible, use a JDialog, as it can be modal
David Menard
2009-09-26 15:15:36