From 36bd9110bfe88dcc40909ccffe27ae90b17353b3 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Wed, 7 Feb 2024 15:03:05 +0100 Subject: [PATCH] The login window now closes automatically after a successful login --- src/main/java/LoginGUI.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index e18d2ea..5bc3739 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -55,6 +55,8 @@ public class LoginGUI extends JFrame implements ActionListener { if (authenticateUser(username, password)) { JOptionPane.showMessageDialog(this, "Login successful!"); // Perform actions after successful login + + dispose(); } else { JOptionPane.showMessageDialog(this, "Invalid username or password", "Login Error", JOptionPane.ERROR_MESSAGE); }