Class MainMenu

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

public class MainMenu extends JFrame
Represents the main menu window of the Maze Adventure game. It displays the main menu with buttons for launching the game, settings, and plugins.

The background of the menu features a rotating image, providing a dynamic visual effect. The menu buttons are styled, and clicking them opens different parts of the application: - the game window, - the settings window, - the plugin interface.

Special features:

  • Animated background scrolling effect.
  • Hover effect on buttons.
  • Fixed window size and behavior.
See Also:
  • Constructor Details

    • MainMenu

      public MainMenu()
      Creates a new instance of the main menu window.

      The constructor sets up the window's title, size, default close operation, and adds components such as the rotating background and buttons.

  • Method Details

    • open

      public static void open()
      Opens the main menu window in the Event Dispatch Thread (EDT). This method is used to ensure thread safety when creating the UI.