Class Login

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class Login extends Api
Login class is a JPanel that contains the login form for the application. It contains fields for the user to enter their card number and password, as well as buttons to submit the form or navigate to the sign-up screen.

The login button triggers the authentication process, and if successful, it navigates to the main screen of the application. The sign-up button navigates to the sign-up screen.
See Also:
  • Field Details

    • loginLabel

      JLabel loginLabel
      Label for the card number field.
    • passLabel

      JLabel passLabel
      Label for the password field.
    • passField

      JPasswordField passField
      Field for the user to enter their password.
    • loginField

      JTextField loginField
      Field for the user to enter their card number.
    • submitBtn

      JButton submitBtn
      Button to submit the login form.
    • signUpBtn

      JButton signUpBtn
      Button to navigate to the sign-up screen.
  • Constructor Details

    • Login

      Login()
      Constructs a Login object.
  • Method Details

    • loginBtnHandler

      private void loginBtnHandler(ActionEvent e)
      Handles the action of the login button. It retrieves the card number and password from the input fields, authenticates the user, and navigates to the main screen if successful. If authentication fails, it shows an error message.
      Parameters:
      e - the event that triggered the action
    • signUpBtnHandler

      private void signUpBtnHandler(ActionEvent e)
      Handles the action of the sign-up button. It navigates to the sign-up screen.
      Parameters:
      e - the event that triggered the action