Java的窗口體不像C#提供自動關閉的程序,需要自己寫代碼去執行窗口體關閉
Frame f = new Frame();
f.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e){
System.exit(0);
}
});
public void windowClosing(WindowEvent windowEvent) {
System.exit(0);
}