Jframe的關閉方法以下:java
setDefaultCloseOperation(EXIT_ON_CLOSE);this
frame的關閉方法以下:spa
this.addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent e) { System.exit(0); } });it