Browse Source

the signup window now closes automatically after completion

remotes/origin/feature/client/make-input-field-buttons-interactive
Richard Schmidt 11 months ago
parent
commit
1ae51d1a1c
  1. 1
      src/main/java/SignUpGUI.java
  2. 6
      user.json

1
src/main/java/SignUpGUI.java

@ -56,6 +56,7 @@ public class SignUpGUI extends JFrame implements ActionListener {
CreateUser user = CreateUser.createUser(randomUUID.toString(), username, password, birthday);
user.saveToJsonFile("user.json");
JOptionPane.showMessageDialog(this, "User signed up successfully!");
dispose();
} catch (IllegalArgumentException ex) {
JOptionPane.showMessageDialog(this, "Error: " + ex.getMessage(), "Sign Up Error", JOptionPane.ERROR_MESSAGE);
}

6
user.json

@ -16,5 +16,11 @@
"userName": "asdasdasd",
"password": "1231412512",
"birthday": "1111111"
},
{
"id": "f2775f81-564b-4101-8e86-ce879a9e7737",
"userName": "asd",
"password": "asdasdasd",
"birthday": "asd"
}
]
Loading…
Cancel
Save