diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java index 6731ae7..a05d9ca 100644 --- a/src/main/java/LoginGUI.java +++ b/src/main/java/LoginGUI.java @@ -75,17 +75,14 @@ public class LoginGUI extends JFrame implements ActionListener { passwordField.addKeyListener(new EnterKeyListener()); - stayLoggedInCheckbox.addActionListener(new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - boolean stayLoggedIn = stayLoggedInCheckbox.isSelected(); - String username = usernameField.getText(); - // Set stayLoggedIn to false if the checkbox is unchecked - if (!stayLoggedInCheckbox.isSelected()) { - stayLoggedIn = false; - } - updateStayLoggedIn(username, stayLoggedIn); + stayLoggedInCheckbox.addActionListener(e -> { + boolean stayLoggedIn = stayLoggedInCheckbox.isSelected(); + String username = usernameField.getText(); + // Set stayLoggedIn to false if the checkbox is unchecked + if (!stayLoggedInCheckbox.isSelected()) { + stayLoggedIn = false; } + updateStayLoggedIn(username, stayLoggedIn); }); } diff --git a/user.json b/user.json index 32960f8..0637a08 100644 --- a/user.json +++ b/user.json @@ -1,2 +1 @@ -[ -] \ No newline at end of file +[] \ No newline at end of file