Class LoginFrame

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

public class LoginFrame extends JFrame
Login window JFrame for user authentication and registration. Provides fields for username and password, and buttons for login and registration. Handles user input validation and delegates authentication logic to provided behaviours.
See Also:
  • Constructor Details

    • LoginFrame

      public LoginFrame() throws IOException
      Constructs the login frame, initializing UI components and layout. Sets up listeners for login and registration actions.
      Throws:
      IOException
      See Also:
  • Method Details

    • open

      public void open()
      Makes the login frame visible and resets input fields.
    • close

      public void close()
      Hides the login frame and resets input fields.
    • setLoginBehaviour

      public void setLoginBehaviour(LoginBehaviour behaviour)
      Sets the login behaviour to handle authentication logic.
      Parameters:
      behaviour - the LoginBehaviour implementation
      See Also:
    • setRegisterBehaviour

      public void setRegisterBehaviour(RegisterBehaviour behaviour)
      Sets the register behaviour to handle user registration logic.
      Parameters:
      behaviour - the RegisterBehaviour implementation
      See Also:
    • resetFields

      public void resetFields()
      Resets the username, password, and info fields to empty.