Browse Source

Added a checkbox to the login window to stay logged in

remotes/origin/server
Richard Schmidt 11 months ago
parent
commit
3a38f7a323
  1. 9
      src/main/java/LoginGUI.java

9
src/main/java/LoginGUI.java

@ -9,10 +9,11 @@ public class LoginGUI extends JFrame implements ActionListener {
private JTextField usernameField;
private JPasswordField passwordField;
private JButton loginButton;
private JCheckBox stayLoggedInCheckbox;
public LoginGUI() {
setTitle("Login");
setSize(300, 150);
setSize(300, 180);
setDefaultCloseOperation(EXIT_ON_CLOSE);
setLayout(null);
@ -32,8 +33,12 @@ public class LoginGUI extends JFrame implements ActionListener {
passwordField.setBounds(100, 50, 160, 25);
add(passwordField);
stayLoggedInCheckbox = new JCheckBox("Stay Logged In");
stayLoggedInCheckbox.setBounds(20, 80, 150, 25);
add(stayLoggedInCheckbox);
loginButton = new JButton("Login");
loginButton.setBounds(100, 90, 100, 25);
loginButton.setBounds(100, 110, 100, 25);
loginButton.addActionListener(this);
add(loginButton);

Loading…
Cancel
Save