Browse Source

Commit #10. Bestätigungsbuttons eingefügt.

master
MSeibert97 5 years ago
parent
commit
73b33ea40a
  1. 27
      .idea/workspace.xml
  2. 37
      src/FitnessTest_M.java

27
.idea/workspace.xml

@ -32,8 +32,8 @@
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/FitnessTest_M.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="118" column="33" selection-start-line="118" selection-start-column="33" selection-end-line="118" selection-end-column="33" />
<state relative-caret-position="323">
<caret line="126" column="42" selection-start-line="126" selection-start-column="42" selection-end-line="126" selection-end-column="42" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#5244#5245#0" expanded="true" />
@ -484,7 +484,14 @@
<option name="project" value="LOCAL" />
<updated>1563277634769</updated>
</task>
<option name="localTasksCounter" value="31" />
<task id="LOCAL-00031" summary="Der neunte Commit. Textfelder zu den Fragen wurden eingefügt">
<created>1563278597504</created>
<option name="number" value="00031" />
<option name="presentableId" value="LOCAL-00031" />
<option name="project" value="LOCAL" />
<updated>1563278597504</updated>
</task>
<option name="localTasksCounter" value="32" />
<servers />
</component>
<component name="TestHistory">
@ -503,6 +510,7 @@
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1936" height="1056" extended-state="6" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17270789" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
@ -511,10 +519,10 @@
<window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Messages" order="0" sideWeight="0.49635628" weight="0.3268206" />
<window_info anchor="bottom" id="Messages" order="0" sideWeight="0.49573562" weight="0.3261105" />
<window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" weight="0.3290461" />
<window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.49840087" visible="true" weight="0.1744312" />
<window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.4978678" visible="true" weight="0.1744312" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.3997344" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
@ -523,7 +531,7 @@
<window_info anchor="bottom" id="Version Control" order="9" weight="0.3268206" />
<window_info anchor="bottom" id="Database Changes" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.3290461" />
<window_info anchor="bottom" id="Event Log" order="12" sideWeight="0.50159913" side_tool="true" visible="true" weight="0.1744312" />
<window_info anchor="bottom" id="Event Log" order="12" sideWeight="0.5021322" side_tool="true" visible="true" weight="0.1744312" />
<window_info anchor="bottom" id="Java Enterprise" order="13" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" />
<window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
@ -597,7 +605,8 @@
<MESSAGE value="Der sechste Commit. Der Bmi wird jetzt per Funktion berechnet, damit&#10;diese auch für Testzwecke verwendet werden kann. auch wurde eine&#10;Testklasse erstellt mit einem Testfall." />
<MESSAGE value="Der siebte Commit. Weitere Testfälle." />
<MESSAGE value="Der achte Commit. Neue Fitnessfragen sollen entworfen&#10;werden. Die Fragen (Labels) wurden erstellt und&#10;positioniert." />
<option name="LAST_COMMIT_MESSAGE" value="Der achte Commit. Neue Fitnessfragen sollen entworfen&#10;werden. Die Fragen (Labels) wurden erstellt und&#10;positioniert." />
<MESSAGE value="Der neunte Commit. Textfelder zu den Fragen wurden eingefügt" />
<option name="LAST_COMMIT_MESSAGE" value="Der neunte Commit. Textfelder zu den Fragen wurden eingefügt" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/Alpha_GOGS$Main.ic" NAME="Main Coverage Results" MODIFIED="1563229577210" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
@ -702,8 +711,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/FitnessTest_M.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="351">
<caret line="118" column="33" selection-start-line="118" selection-start-column="33" selection-end-line="118" selection-end-column="33" />
<state relative-caret-position="323">
<caret line="126" column="42" selection-start-line="126" selection-start-column="42" selection-end-line="126" selection-end-column="42" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#5244#5245#0" expanded="true" />

37
src/FitnessTest_M.java

@ -9,9 +9,6 @@ import java.awt.event.KeyEvent;
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;
@ -30,15 +27,17 @@ public class FitnessTest_M extends JFrame {
JTextField question_tf2 = null;
JTextField question_tf3 = null;
JTextField question_tf4 = null;
JButton bmi_confirm = null;
JButton question1_confirm = null;
JButton question2_confirm = null;
JButton question3_confirm = null;
JButton question4_confirm = null;
public FitnessTest_M() {
frame = new JFrame("Fitness Test");
frame.setLayout(null);
frame.setSize(1920, 1080);
// panel_1 = new JPanel(new BorderLayout());
// frame.setContentPane(panel_1);
menuBar = new JMenuBar();
frame.setJMenuBar(menuBar);
menu = new JMenu("Option");
@ -62,7 +61,6 @@ public class FitnessTest_M extends JFrame {
height_label = new JLabel("Geben sie hier ihre Koerpergroesse ein (in Meter)");
height_label.setBounds(10, 10, 280, 30);
//panel_1.add(height_label);
height_tf = new JTextField(40);
height_tf.setBounds(10, 40, 280, 30);
height_tf.addKeyListener(new KeyAdapter() {
@ -77,7 +75,6 @@ public class FitnessTest_M extends JFrame {
}
}
});
// panel_1.add(height_tf);
weight_ungueltig = new JLabel();
weight_ungueltig.setForeground(Color.red);
@ -85,7 +82,6 @@ public class FitnessTest_M extends JFrame {
weight_label = new JLabel("Geben sie hier ihr Gewicht ein (in Kilogramm)");
weight_label.setBounds(320, 10, 300, 30);
// panel_1.add(weight_label);
weight_tf = new JTextField(40);
weight_tf.setBounds(320, 40, 300, 30);
weight_tf.addKeyListener(new KeyAdapter() {
@ -100,7 +96,6 @@ public class FitnessTest_M extends JFrame {
}
}
});
// panel_1.add(weight_tf);
question_label1 = new JLabel("Trainieren sie: \n A: Regelmässig B: Ab und zu C: Gar nicht");
question_label1.setBounds(660, 10, 500, 60);
@ -120,6 +115,17 @@ public class FitnessTest_M extends JFrame {
question_tf4 = new JTextField(10);
question_tf4.setBounds(10, 210, 500, 30);
bmi_confirm = new JButton("BMI Bestätigen");
bmi_confirm.setBounds(400, 90, 150, 30);
question1_confirm = new JButton("Bestätigen");
question1_confirm.setBounds(660, 100, 150, 30);
question2_confirm = new JButton("Bestätigen");
question2_confirm.setBounds(1170, 100, 150, 30);
question3_confirm = new JButton("Bestätigen");
question3_confirm.setBounds(520, 240, 150, 30);
question4_confirm = new JButton("Bestätigen");
question4_confirm.setBounds(10, 240, 150, 30);
frame.add(height_label);
frame.add(height_tf);
@ -135,9 +141,14 @@ public class FitnessTest_M extends JFrame {
frame.add(question_tf2);
frame.add(question_tf3);
frame.add(question_tf4);
bmi_rechnen = new JButton("BMI berechnen");
bmi_rechnen.setBounds(200, 90, 200, 30);
frame.add(bmi_confirm);
frame.add(question1_confirm);
frame.add(question2_confirm);
frame.add(question3_confirm);
frame.add(question4_confirm);
bmi_rechnen = new JButton("BMI Berechnen");
bmi_rechnen.setBounds(100, 90, 150, 30);
bmi_rechnen.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent b) {
if(b.getSource() == bmi_rechnen) {

Loading…
Cancel
Save