继承关系
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
Constructor
1 | JDialog(); |
Method
void setDefaultCloseOperation(int operation)
相对于JFrame没有EXIT_ON_CLOSE
WindowConstants.
DO_NOTHING_ON_CLOSE
: 不操作。WindowConstants.
HIDE_ON_CLOSE
: 隐藏窗口WindowConstants.
DISPOSE_ON_CLOSE
: 销毁窗口,释放资源