java命名空间javax.swing类jinternalframe的类成员方法:
setdefaultcloseoperation定义及介绍
本文导语:
setdefaultcloseoperation
public void setdefaultcloseoperation(int operation)
设置用户在此内部窗体上发起 "close" 时默认执行的操作。可能的选项为:
do_nothing_on_close
不执行任何操作。这要求程序在已注册 internalframelistener 对象的 windowclosing ...
setdefaultcloseoperation
public void setdefaultcloseoperation(int operation)
- 设置用户在此内部窗体上发起 "close" 时默认执行的操作。可能的选项为:
do_nothing_on_close
- 不执行任何操作。这要求程序在已注册
internalframelistener 对象的 windowclosing 方法中处理该操作。
hide_on_close
- 自动使该内部窗体不可见。
dispose_on_close
- 自动释放该内部窗体。
默认值是 dispose_on_close。执行指定的 close 操作前,该内部窗体激发 internal_frame_closing 事件。
- 参数:
operation - 在 javax.swing.windowconstants(由 jinternalframe 所实现的接口)中定义的以下常量之一:do_nothing_on_close、hide_on_close 或 dispose_on_close- 另请参见:
addinternalframelistener(javax.swing.event.internalframelistener),
getdefaultcloseoperation(),
jcomponent.setvisible(boolean),
dispose(),
internalframeevent.internal_frame_closing