PDA

Click to See Complete Forum and Search --> : Problem associating with window focusing ...


goguest
Mar 14th, 2002, 12:07 AM
Say, I have a main window with a button inside, and if the user presses on that button, another warning window with an OK button inside will then pop up. Now the question is how can I disallow the user from returning back to the main window unless the OK button on the pop-up window is pressed ? Thanx.
:confused:

Dillinger4
Mar 14th, 2002, 12:41 AM
Pretty sure JOptionpane.showMessageDialog
is modal by default so that would take care
of the problem. If you were creating a dialog
from scratch you would have to pass true
to the constructor to set modal to true.

public JDialog(Frame parent, String title, boolean modal)