This question is not a good description, just for my purpose.
I want a form to bring up another form. However, the parent form can only be jpanel, not jframe, which is determined by my question. and makes the parent form non-writable.
Of course, if it's jframe, it's been a long time.
Brings up the scriptable window, which is the child window JDialog, but the parent form can only be jframe or window in its construction method.
However, with this, you can use:
Swingutilities.getwindowancestor (this);
However, JFrame mode does not know what to do, to see which Daniel can teach me.
On the other hand, although the JDialog has been successfully paged out, the parent form can still be written, but it's always underneath the subform.
This is what makes JDialog make the parent form non-writable, and when the subform is closed, it can be written,
Method:
①: A handle to a parent form is passed to the subform,
②: A new Out subform that sets the ennable of all controls to False
③: Capturing windowclosing Events
④: Use a handle to change the ennable of the corresponding control.
Note: But still slightly trouble, I am not fine, see which Daniel can give: in the JPanel to bring up a new window jdialog, and JFrame call out JDialog effect, yes, the parent form can not focus.
Pull a jdialog from JPanel and make the parent window JPanel control unavailable