Class HomeButton

java.lang.Object
mastermind.gui.panels.HomeButton

public class HomeButton extends Object
A class to create a home button that will take the user back to GameModeSelector.
  • Method Details

    • registerHomeHandlers

      public static void registerHomeHandlers(JFrame frame)
      Register the home button handler. This method adds an action listener to the home button that creates a new GameModeSelector frame. It ensures that the handler is only registered once by checking the isHandlerRegistered flag.
      Parameters:
      frame - Frame of the program.
    • drawHomeButton

      public static void drawHomeButton(JFrame frame)
      Draw the home button on the frame. This method adds the button panel (containing the home button) to the specified frame.
      Parameters:
      frame - Frame of the program.