API layer added

Victor
2wenty1ne 2024-06-04 12:10:04 +02:00
parent 5344f8f525
commit 2cfea41eb8
1 changed files with 14 additions and 5 deletions

View File

@ -1,13 +1,15 @@
package gui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GuiMain extends JFrame implements ActionListener {
JLabel headerText;
JButton createAcc;
JTextArea headerTextArea;
JButton createAccButton;
// JTextField headerText;
@ -17,17 +19,24 @@ public class GuiMain extends JFrame implements ActionListener {
this.setSize(400, 300);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
headerText = new JLabel("Log In");
//? Upper welcome text
JPanel upper = new JPanel();
headerText = new JLabel("Log In");
upper.add(headerText);
headerTextArea = new JTextArea("Test");
headerTextArea.setForeground(Color.WHITE);
upper.add(headerTextArea);
//? Create Acc button
JPanel lower = new JPanel();
createAcc = new JButton("Create Account");
createAcc.addActionListener(this);
createAccButton = new JButton("Create Account");
createAccButton.addActionListener(this);
lower.add(createAcc);
lower.add(createAccButton);
//? Add all sections to frame
this.add(upper, "North");
this.add(lower, "South");
}