public class test extends JFrame {
public test() {
this.addWindowListener(new WindowAdapter() { //添加窗口关闭事件
public void windowClosing(WindowEvent e) {
///// Nothing /////
}
});
this.setSize(350,250);
this.show();
}
public static void main(String[] args) {
new test();
}
}