摘要: 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 阅读全文
posted @ 2012-08-07 17:49 王 庆 阅读(2598) 评论(0) 推荐(0) 编辑