摘要:
1、JFrame实现WindowListener2、将当前窗口加入监听this.addWindowListener(this); //按关闭按钮,啥事也不做this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);3、实现windowClosing方法/** * 关闭主窗口处理 */ @Override public void windowClosing(WindowEvent e) { int option = JOptionPane.showConfirmDialog(this, "确定退出系统?", "提示&quo 阅读全文