|
@ -10,10 +10,11 @@ public class LoginGUI extends JFrame implements ActionListener { |
|
|
private JPasswordField passwordField; |
|
|
private JPasswordField passwordField; |
|
|
private JButton loginButton; |
|
|
private JButton loginButton; |
|
|
private JCheckBox stayLoggedInCheckbox; |
|
|
private JCheckBox stayLoggedInCheckbox; |
|
|
|
|
|
private JButton signUpButton; |
|
|
|
|
|
|
|
|
public LoginGUI() { |
|
|
public LoginGUI() { |
|
|
setTitle("Login"); |
|
|
setTitle("Login"); |
|
|
setSize(300, 180); |
|
|
|
|
|
|
|
|
setSize(300, 220); |
|
|
setDefaultCloseOperation(EXIT_ON_CLOSE); |
|
|
setDefaultCloseOperation(EXIT_ON_CLOSE); |
|
|
setLayout(null); |
|
|
setLayout(null); |
|
|
|
|
|
|
|
@ -42,6 +43,11 @@ public class LoginGUI extends JFrame implements ActionListener { |
|
|
loginButton.addActionListener(this); |
|
|
loginButton.addActionListener(this); |
|
|
add(loginButton); |
|
|
add(loginButton); |
|
|
|
|
|
|
|
|
|
|
|
signUpButton = new JButton("Sign Up"); |
|
|
|
|
|
signUpButton.setBounds(100, 140, 100, 25); // Adjusted position |
|
|
|
|
|
signUpButton.addActionListener(this); |
|
|
|
|
|
add(signUpButton); |
|
|
|
|
|
|
|
|
getRootPane().setDefaultButton(loginButton); |
|
|
getRootPane().setDefaultButton(loginButton); |
|
|
|
|
|
|
|
|
passwordField.addKeyListener(new EnterKeyListener()); |
|
|
passwordField.addKeyListener(new EnterKeyListener()); |
|
|