From fce141d40ef0cf9768ef311097c5840a5bd8c381 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Wed, 7 Feb 2024 11:26:07 +0100 Subject: [PATCH] Added textfield for password input --- src/main/java/LoginGUI.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index b4e90a2..879cb74 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -5,6 +5,7 @@ import java.util.List; public class LoginGUI extends JFrame implements ActionListener { private JTextField usernameField; + private JPasswordField passwordField; public LoginGUI() { setTitle("Login"); @@ -20,6 +21,14 @@ public class LoginGUI extends JFrame implements ActionListener { 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