From b5ea98caa3b2ffd132277e734f3b3730b53fdf99 Mon Sep 17 00:00:00 2001 From: MSeibert97 Date: Tue, 16 Jul 2019 08:17:12 +0200 Subject: [PATCH] =?UTF-8?q?Der=20erste=20commit=20f=C3=BCr=20meine=20Fitne?= =?UTF-8?q?ssTest=20Klasse.=20Hier=20wurde=20nur=20ein=20Grundger=C3=BCst?= =?UTF-8?q?=20f=C3=BCr=20dessen=20GUI=20erstellt.=20Noch=20sind=20keine=20?= =?UTF-8?q?richtige=20Funktionen=20enthalten.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .idea/libraries/Drools_6_2_0.xml | 3 +- .idea/misc.xml | 2 +- .idea/workspace.xml | 116 ++++++++++++++++--------------- src/FitnessTest_M.java | 60 ++++++++++++++++ src/Main.java | 2 +- 5 files changed, 123 insertions(+), 60 deletions(-) create mode 100644 src/FitnessTest_M.java diff --git a/.idea/libraries/Drools_6_2_0.xml b/.idea/libraries/Drools_6_2_0.xml index 51bdc0e..0a7099b 100644 --- a/.idea/libraries/Drools_6_2_0.xml +++ b/.idea/libraries/Drools_6_2_0.xml @@ -1,6 +1,5 @@ - - + diff --git a/.idea/misc.xml b/.idea/misc.xml index 0548357..57d62b3 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,6 +1,6 @@ - + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index a206997..96b8a8b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,12 +2,8 @@ - - - - - - + + - + - - + + + + + + + + + + + + + + + + + + @@ -38,9 +50,9 @@ @@ -75,15 +87,16 @@ - @@ -93,22 +106,16 @@ - - - + + - - - - - - - + + @@ -116,6 +123,7 @@ + @@ -174,7 +182,10 @@ + - + 1562340910388 - - + - + @@ -402,7 +412,7 @@ - + @@ -413,7 +423,6 @@ - @@ -424,6 +433,7 @@ + @@ -514,32 +524,12 @@ - - - - - - - - - - - - - - - - - - + + - - - - - - + + @@ -571,12 +561,26 @@ + + + + + + + + + + + + - - + + + + diff --git a/src/FitnessTest_M.java b/src/FitnessTest_M.java new file mode 100644 index 0000000..fdd2801 --- /dev/null +++ b/src/FitnessTest_M.java @@ -0,0 +1,60 @@ +import javax.swing.*; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +public class FitnessTest_M extends JFrame { + JFrame frame = null; + JPanel panel_1 = null; + JButton button_1 = null; + JTextField field_1 = null; + JMenuItem menuItem_1 = null; + JMenuBar menuBar = null; + JMenu menu = null; + JLabel height_label = null; + JTextField height_tf = null; + JLabel weight_label = null; + JTextField weight_tf = null; + + public FitnessTest_M() { + frame = new JFrame("Fitness Test"); + frame.setSize(1920, 1080); + + panel_1 = new JPanel(); + frame.setContentPane(panel_1); + + menu = new JMenu("Option"); + menuItem_1 = new JMenuItem("Exit"); + panel_1.add(menuItem_1); + + menuItem_1.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent a) { + if(a.getSource() == menuItem_1) { + System.exit(0); + } + } + }); + + menu.add(menuItem_1); + + menuBar = new JMenuBar(); + menuBar.add(menu); + + frame.setJMenuBar(menuBar); + + height_label = new JLabel("Geben sie hier ihre Körpergröße ein (in Meter)"); + panel_1.add(height_label); + height_tf = new JTextField(40); + panel_1.add(height_tf); + + weight_label = new JLabel("Geben sie hier ihr Gewicht ein (in Kilogramm)"); + panel_1.add(weight_label); + weight_tf = new JTextField(40); + panel_1.add(weight_tf); + + frame.setVisible(true); + } + + public static void main(String[] args) { + FitnessTest_M M = new FitnessTest_M(); + } +} diff --git a/src/Main.java b/src/Main.java index e49e1bc..2976e22 100644 --- a/src/Main.java +++ b/src/Main.java @@ -139,7 +139,7 @@ public class Main { JOptionPane.showMessageDialog(fr, "Aufruf von Michaels Tools"); fr.setVisible(false); - //Quiz qwqqq = new Quiz(); + FitnessTest_M M = new FitnessTest_M(); }catch (Exception ex) {