From 6986de2c3de5b00b1035baf16c49405eb68dc062 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Tue, 6 Feb 2024 16:32:23 +0100 Subject: [PATCH] added a textfield for password to signup GUI --- src/main/java/SignUpGUI.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/SignUpGUI.java b/src/main/java/SignUpGUI.java index 1f50d14..1795445 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; + private JTextField usernameField, passwordField; public SignUpGUI() { setTitle("Sign Up"); @@ -19,6 +19,14 @@ public class SignUpGUI extends JFrame implements ActionListener { usernameField = new JTextField(); usernameField.setBounds(100, 20, 160, 25); add(usernameField); + + JLabel passwordLabel = new JLabel("Password:"); + passwordLabel.setBounds(20, 50, 80, 25); + add(passwordLabel); + + passwordField = new JPasswordField(); + passwordField.setBounds(100, 50, 160, 25); + add(passwordField); } @Override