From b3e564625f62c755d7f9889eb4e0dfb569994b84 Mon Sep 17 00:00:00 2001 From: Richard Schmidt Date: Wed, 7 Feb 2024 11:21:46 +0100 Subject: [PATCH] Added GUI window for user login --- src/main/java/LoginGUI.java | 29 +++++++++++++++++++++++++++++ user.json | 18 ++++++++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 src/main/java/LoginGUI.java diff --git a/src/main/java/LoginGUI.java b/src/main/java/LoginGUI.java new file mode 100644 index 0000000..31fc2f2 --- /dev/null +++ b/src/main/java/LoginGUI.java @@ -0,0 +1,29 @@ +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; +import java.util.List; + +public class LoginGUI extends JFrame implements ActionListener { + + public LoginGUI() { + setTitle("Login"); + setSize(300, 150); + setDefaultCloseOperation(EXIT_ON_CLOSE); + setLayout(null); + + + } + + @Override + public void actionPerformed(ActionEvent e) { + + } + + + public static void main(String[] args) { + SwingUtilities.invokeLater(() -> { + LoginGUI loginGUI = new LoginGUI(); + loginGUI.setVisible(true); + }); + } +} \ No newline at end of file diff --git a/user.json b/user.json index 0201a67..78ef422 100644 --- a/user.json +++ b/user.json @@ -10,5 +10,23 @@ "userName": "asd1", "password": "123456", "birthday": "1" + }, + { + "id": "b54391dc-c06b-496c-828a-501f9a182cf9", + "userName": "new user", + "password": "123456", + "birthday": "1" + }, + { + "id": "6db2ea00-246d-4604-bef2-0875c3cb550e", + "userName": "Another Test User", + "password": "TestPasswort123", + "birthday": "01.01.2000" + }, + { + "id": "864695a6-8037-41e5-9f0e-4b92744b2113", + "userName": "Another Test User", + "password": "TestPasswort123", + "birthday": "01.01.2000" } ] \ No newline at end of file