// 添加事件监听器
shell.addShellListener(new ShellAdapter() {
@Override
public void shellClosed(ShellEvent e) {
// 获得确认结果
boolean result = new MsgBox().questionTip(shell, "确定要退出程序吗?");
// 确认是否退出
e.doit = result;
}
});
// 添加事件监听器
shell.addShellListener(new ShellAdapter() {
@Override
public void shellClosed(ShellEvent e) {
// 获得确认结果
boolean result = new MsgBox().questionTip(shell, "确定要退出程序吗?");
// 确认是否退出
e.doit = result;
}
});