SWING关闭窗口的方法

this.setDefaultCloseOperation(EXIT_ON_CLOSE);
//		addWindowListener(new WindowAdapter() {
//			public void windowClosing(WindowEvent e) {
//				setVisible(false);
//				System.exit(0);
//			}
//		});

 以上为两种关闭窗口的方法处理。

你可能感兴趣的:(swing)