public interface WindowListener extends EventListener { public void windowClosing (WindowEvent e); //把退出窗口的语句写在本方法中 public void windowOpened (WindowEvent e); //窗口打开时调用 public void windowIconified (WindowEvent e); //窗口图标化时调用 public void windowDeiconified (WindowEvent e); //窗口非图标化时调用 public void windowClosed (WindowEvent e); //窗口关闭时调用 public void windowActivated (WindowEvent e); //窗口激活时调用 public void windowDeactivated (WindowEvent e); //窗口非激活时调用 }