Browse Source

Added a signup button

remotes/origin/server
Richard Schmidt 11 months ago
parent
commit
1437f9f5ce
  1. 8
      src/main/java/LoginGUI.java

8
src/main/java/LoginGUI.java

@ -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());

Loading…
Cancel
Save