Class MainMenu.Child

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
LabyrinthFrame, PluginsFrame, SettingsFrame, WorldFrame
Enclosing class:
MainMenu

protected abstract static class MainMenu.Child extends JFrame
Base class for child windows that open from the main menu.

This class ensures that when the child window is closed, the main menu is reopened.

See Also:
  • Constructor Details

    • Child

      public Child()
      Creates a new child window.

      This constructor sets the default close operation to do nothing, and adds a window listener to ensure that closing the child window brings back the main menu.

  • Method Details

    • onClose

      protected void onClose()
      Handles the closing event of the child window.

      This method is called when the window is closed, and it reopens the main menu.