FileDocCategorySizeDatePackage
CloseableFrame.javaAPI DocExample1947Sat Jun 02 02:39:48 BST 2001None

CloseableFrame

public class CloseableFrame extends Frame implements WindowListener
This class is a convenient subclass of Frame that knows how to handled the WindowClosing event generated when the user requests that the window be closed. By default it simply closes itself, which makes it useful for things like modeless dialogs that can be closed without affecting the rest of the application. Subclasses of CloseableFrame can override the windowClosing() method if they want to perform additional actions. Applications that use the CloseableFrame class for a main window may want to exit when a CloseableFrame actually closes. They can do this by overriding windowClosed() or by registering a separate WindowListener to receive the windowClosed() event.

Fields Summary
Constructors Summary
public CloseableFrame()

 this.addWindowListener(this); 
public CloseableFrame(String title)

 
    super(title); 
    this.addWindowListener(this);
  
Methods Summary
public voidwindowActivated(java.awt.event.WindowEvent e)

public voidwindowClosed(java.awt.event.WindowEvent e)

public voidwindowClosing(java.awt.event.WindowEvent e)

 this.dispose(); 
public voidwindowDeactivated(java.awt.event.WindowEvent e)

public voidwindowDeiconified(java.awt.event.WindowEvent e)

public voidwindowIconified(java.awt.event.WindowEvent e)

public voidwindowOpened(java.awt.event.WindowEvent e)