From 1437f9f5ce043ad7e5ecc6da399bcf1710e46ac2 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Thu, 8 Feb 2024 11:46:04 +0100 Subject: [PATCH] Added a signup button --- src/main/java/LoginGUI.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index 6672019..08b26b5 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -10,10 +10,11 @@ public class LoginGUI extends JFrame implements ActionListener { private JPasswordField passwordField; private JButton loginButton; private JCheckBox stayLoggedInCheckbox; + private JButton signUpButton; public LoginGUI() { setTitle("Login"); - setSize(300, 180); + setSize(300, 220); setDefaultCloseOperation(EXIT_ON_CLOSE); setLayout(null); @@ -42,6 +43,11 @@ public class LoginGUI extends JFrame implements ActionListener { loginButton.addActionListener(this); add(loginButton); + signUpButton = new JButton("Sign Up"); + signUpButton.setBounds(100, 140, 100, 25); // Adjusted position + signUpButton.addActionListener(this); + add(signUpButton); + getRootPane().setDefaultButton(loginButton); passwordField.addKeyListener(new EnterKeyListener());