public void setDefaultCloseOperation(int operation)
Sets the operation that will happen by default when the user initiates a "close" on this internal frame. The possible choices are:
DO_NOTHING_ON_CLOSE
Do nothing. This requires the program to handle the operation in the internalFrameClosing method of a registered InternalFrameListener object.
HIDE_ON_CLOSE
Automatically make the internal frame invisible.
DISPOSE_ON_CLOSE
Automatically dispose of the internal frame.
The default value is DISPOSE_ON_CLOSE. Before performing the specified close operation, the internal frame fires an INTERNAL_FRAME_CLOSING event.
Parameters:
operation - one of the following constants defined in javax.swing.WindowConstants (an interface implemented by JInternalFrame): DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE, or DISPOSE_ON_CLOSE
See Also:
addInternalFrameListener(javax.swing.event.InternalFrameListener), getDefaultCloseOperation(), JComponent.setVisible(boolean), dispose(), InternalFrameEvent.INTERNAL_FRAME_CLOSING
Partager