From ff5fbad1ad06092db34ef6b343ae135d34b64876 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Tue, 6 Feb 2024 16:27:17 +0100 Subject: [PATCH] added textfield for username to signup GUI --- src/main/java/SignUpGUI.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/SignUpGUI.java b/src/main/java/SignUpGUI.java index ce58bc2..1f50d14 100644 --- a/src/main/java/SignUpGUI.java +++ b/src/main/java/SignUpGUI.java @@ -4,7 +4,7 @@ import java.awt.event.ActionListener; import java.util.UUID; public class SignUpGUI extends JFrame implements ActionListener { - + private JTextField usernameField; public SignUpGUI() { setTitle("Sign Up"); @@ -12,7 +12,13 @@ public class SignUpGUI extends JFrame implements ActionListener { setDefaultCloseOperation(EXIT_ON_CLOSE); setLayout(null); - + JLabel usernameLabel = new JLabel("Username:"); + usernameLabel.setBounds(20, 20, 80, 25); + add(usernameLabel); + + usernameField = new JTextField(); + usernameField.setBounds(100, 20, 160, 25); + add(usernameField); } @Override