这样,
你实现一个继承自 JDialog的类,
先setModal(true), 然后再setVisible
第二个问题:
JFrame.setDefaultCloseOperation(int),
JDialog.setDefaultCloseOperation(int),
static int DISPOSE_ON_CLOSE
The dispose-window default window close operation.
static intdo
_NOTHING_ON_CLOSE
Thedo
-nothing default window close operation
static int EXIT_ON_CLOSE
The exit application default window close operation.
static int HIDE_ON_CLOSE
The hide-window default window close operation