From 2fe0eb289b1b0d5679f8002a1e0afa405d73c38f Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Wed, 7 Feb 2024 11:28:15 +0100 Subject: [PATCH] Added action button for login window --- src/main/java/LoginGUI.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index 879cb74..08b19a2 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -6,6 +6,7 @@ import java.util.List; public class LoginGUI extends JFrame implements ActionListener { private JTextField usernameField; private JPasswordField passwordField; + private JButton loginButton; public LoginGUI() { setTitle("Login"); @@ -29,6 +30,11 @@ public class LoginGUI extends JFrame implements ActionListener { passwordField.setBounds(100, 50, 160, 25); add(passwordField); + loginButton = new JButton("Login"); + loginButton.setBounds(100, 90, 100, 25); + loginButton.addActionListener(this); + add(loginButton); + } @Override