Module platform

Class ApplicationFrame

All Implemented Interfaces:
WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class ApplicationFrame extends JFrame implements WindowListener
A base class for creating the main frame for simple applications. The frame listens for window closing events, and responds by shutting down the JVM. This is OK for small demo applications...for more serious applications, you'll want to use something more robust.
See Also:
  • Constructor Details

    • ApplicationFrame

      public ApplicationFrame(String title)
      Constructs a new application frame.
      Parameters:
      title - the frame title.
  • Method Details

    • windowClosing

      public void windowClosing(WindowEvent event)
      Listens for the main window closing, and shuts down the application.
      Specified by:
      windowClosing in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowClosed

      public void windowClosed(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowClosed in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowActivated

      public void windowActivated(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowActivated in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowDeactivated

      public void windowDeactivated(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowDeactivated in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowDeiconified

      public void windowDeiconified(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowDeiconified in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowIconified

      public void windowIconified(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowIconified in interface WindowListener
      Parameters:
      event - information about the window event.
    • windowOpened

      public void windowOpened(WindowEvent event)
      Required for WindowListener interface, but not used by this class.
      Specified by:
      windowOpened in interface WindowListener
      Parameters:
      event - information about the window event.