public void WindowClosing(WindowEvent e){
if(e.getID()==WindowEvent.WINDOW_CLOSING)
System.out.println("关闭按钮已按下!");
System.exit(0);
}
if(e.getID()==WindowEvent.WINDOW_CLOSING)
System.out.println("关闭按钮已按下!");
System.exit(0);
}
if(e.getID()==WindowEvent.WINDOW_CLOSING)
System.out.println("关闭按钮已按下!");
dispose();
System.exit(0);
不知道行不
要是还不行请你把错误提示贴出来
dispose()关闭窗口;
public void windowIconified(WindowEvent e)
public void windowActivated(WindowEvent e)
public void windowStateChanged(WindowEvent e)中 window 首字母w都是小写。