Compare commits

...

2 Commits
main ... Dev

Author SHA1 Message Date
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 50 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,45 @@
package gui;
import javax.swing.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class GuiMain extends JFrame implements ActionListener {
JLabel headerText;
JButton createAcc;
// 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);
headerText = new JLabel("Log In");
JPanel upper = new JPanel();
upper.add(headerText);
JPanel lower = new JPanel();
createAcc = new JButton("Create Account");
createAcc.addActionListener(this);
lower.add(createAcc);
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);
}
}