frame使关闭口生效

this.addWindowListener(new WindowAdapter(){ // 为了关闭窗口
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

 

posted @ 2018-03-16 20:20  爱吃醋的工程师  阅读(150)  评论(0编辑  收藏  举报