From 9a423e939273fcfe805cde22bb8c8c8a74655702 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Thu, 21 Nov 2024 23:42:22 +0530 Subject: Added Sign Up functionality (crappy but better than nothing) --- src/UI/Components/LoginPanel.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/UI/Components/LoginPanel.java') diff --git a/src/UI/Components/LoginPanel.java b/src/UI/Components/LoginPanel.java index e79326b..9950706 100644 --- a/src/UI/Components/LoginPanel.java +++ b/src/UI/Components/LoginPanel.java @@ -9,12 +9,16 @@ import java.awt.*; public class LoginPanel extends JPanel { public JButton loginButton; + public JButton signUpButton; + public JLabel statusLabel; private SettingsPopupWindow settingsPopupWindow; public InputBox usernameInput; public InputBox passwordInput; public LoginPanel() { + statusLabel = new JLabel(); + usernameInput = new InputBox("Username:"); usernameInput.setBorder(new EmptyBorder(140, 100, 0, 100)); this.add(usernameInput); @@ -24,7 +28,6 @@ public class LoginPanel extends JPanel { this.add(passwordInput); JPanel buttonPanel = new JPanel(); - buttonPanel.add(Box.createRigidArea(new Dimension(140, 0))); JButton settingsButton = new JButton("Settings"); settingsButton.addActionListener(_ -> { @@ -42,6 +45,11 @@ public class LoginPanel extends JPanel { }); buttonPanel.add(settingsButton); + buttonPanel.add(Box.createRigidArea(new Dimension(90, 0))); + + signUpButton = new JButton("Sign Up"); + buttonPanel.add(signUpButton); + buttonPanel.add(Box.createRigidArea(new Dimension(10, 0))); loginButton = new JButton("Login"); @@ -50,6 +58,9 @@ public class LoginPanel extends JPanel { buttonPanel.setLayout(new BoxLayout(buttonPanel, BoxLayout.X_AXIS)); this.add(buttonPanel); + this.add(Box.createRigidArea(new Dimension(600, 0))); + this.add(statusLabel); + this.setMaximumSize(new Dimension(350, 200)); } } -- cgit v1.2.3