Compare commits

...

3 Commits
main ... Victor

Author SHA1 Message Date
2wenty1ne 2cfea41eb8 API layer added 2024-06-04 12:10:04 +02:00
2wenty1ne 5344f8f525 API layer added 2024-06-04 12:09:16 +02:00
Victor Hans-Georg Waitz 1a6983fc2e Added first log in buttons 2024-06-02 17:05:36 +02:00
5 changed files with 59 additions and 29 deletions

View File

@ -53,7 +53,7 @@
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>
src.main.java.com.example.helloWorld</mainClass>
gui.GuiMain</mainClass>
</transformer>
</transformers>
</configuration>

View File

@ -0,0 +1,4 @@
package api;
public class OpenWeatherMapApi {
}

View File

@ -1,9 +0,0 @@
package com.example;
public class helloWorld {
public static void main(String[] args) {
System.out.println("Hello world!");
System.out.println("Hello world!");
}
}

View File

@ -1,19 +0,0 @@
package gui;
import javax.swing.JFrame;
public class Gui {
public static void main(String[] args) {
JFrame jf = new JFrame();
jf.setTitle("Travel Buddy");
jf.setSize(400, 300);
jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
jf.setVisible(true);
}
}

View File

@ -0,0 +1,54 @@
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;
JTextArea headerTextArea;
JButton createAccButton;
// JTextField headerText;
public GuiMain(){
//? Creating the jFrame object with some parameters
this.setTitle("Travel Buddy");
this.setSize(400, 300);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//? 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();
createAccButton = new JButton("Create Account");
createAccButton.addActionListener(this);
lower.add(createAccButton);
//? Add all sections to frame
this.add(upper, "North");
this.add(lower, "South");
}
@Override
public void actionPerformed(ActionEvent e) {
}
public static void main(String[] args) {
GuiMain gui = new GuiMain();
gui.setVisible(true);
}
}