java.awt.Window
is a subclass of java.awt.Component
, a Window
, Frame
or Dialog
can fire events. In particular it fires
WindowEvent
s. There are seven of these:
To respond to these events you register a
WindowListener
object with the window. The object must implement the WindowListener
interface and include these methods:
public abstract void windowOpened(WindowEvent e)
public abstract void windowClosing(WindowEvent e)
public abstract void windowClosed(WindowEvent e)
public abstract void windowIconified(WindowEvent e)
public abstract void windowDeiconified(WindowEvent e)
public abstract void windowActivated(WindowEvent e)
public abstract void windowDeactivated(WindowEvent e)