Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.idea/workspace.xml
new_repo
Hauch IT 6 years ago
parent
commit
4542855297
  1. 2
      .idea/misc.xml
  2. 93
      .idea/workspace.xml
  3. BIN
      out/production/Alpha/Main.class
  4. BIN
      out/production/Alpha/Quiz_E.class
  5. 152
      src/Quiz.java
  6. 107
      src/Quiz_E.java

2
.idea/misc.xml

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

93
.idea/workspace.xml

@ -2,12 +2,8 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/MainGUI.form" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/MainGUI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/uiDesigner.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/uiDesigner.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Alpha/D_Test2.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Alpha/D_Test2.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Alpha/D_Test3.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Alpha/D_Test3.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tage_D.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tage_D.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -21,14 +17,20 @@
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/MainGUI.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
</file>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/MainGUI.form">
<provider selected="true" editor-type-id="ui-designer" />
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="54" column="44" lean-forward="true" selection-start-line="54" selection-start-column="44" selection-end-line="54" selection-end-column="44" />
<folding>
<element signature="e#2655#2656#0" expanded="true" />
<element signature="e#3183#3184#0" expanded="true" />
<element signature="e#3238#3239#0" expanded="true" />
<element signature="e#3364#3365#0" expanded="true" />
<element signature="e#3419#3420#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
</leaf>
@ -64,7 +66,6 @@
<option value="$PROJECT_DIR$/src/Geburtstag.java" />
<option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/Tage_D.java" />
<option value="$PROJECT_DIR$/src/MainGUI.form" />
</list>
</option>
</component>
@ -94,12 +95,6 @@
<item name="Alpha" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
</path>
<path>
<item name="Alpha" type="b2602c69:ProjectViewProjectNode" />
<item name="Alpha" type="462c0819:PsiDirectoryNode" />
<item name="src" type="462c0819:PsiDirectoryNode" />
<item name="MainGUI" type="e9f4de52:FormNode" />
</path>
</expand>
<select />
</subPane>
@ -280,13 +275,13 @@
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="14999000" />
<option name="totallyTimeSpent" value="12420000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<frame x="-8" y="-8" width="1936" height="1066" extended-state="6" />
<editor active="true" />
<layout>
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.09640103" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.07942431" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" />
@ -296,7 +291,7 @@
<window_info anchor="bottom" id="Messages" order="0" weight="0.3290461" />
<window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" />
<window_info anchor="bottom" id="Run" order="3" weight="0.3306773" />
<window_info active="true" anchor="bottom" id="Run" order="3" visible="true" weight="0.33118972" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.39978564" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
@ -359,7 +354,21 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test2.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="13" selection-start-column="13" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Geburtstag.java" />
<entry file="file://$PROJECT_DIR$/src/Quiz_E.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="357">
<caret line="37" selection-start-line="37" selection-end-line="38" selection-end-column="45" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="473">
@ -373,40 +382,20 @@
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test3.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="34">
<caret line="2" lean-forward="true" selection-start-line="2" selection-end-line="2" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test2.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="13" selection-start-column="13" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz_E.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="391">
<caret line="27" column="13" lean-forward="true" selection-start-line="27" selection-start-column="13" selection-end-line="27" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="238">
<caret line="51" column="60" lean-forward="true" selection-start-line="51" selection-start-column="60" selection-end-line="51" selection-end-column="60" />
<state relative-caret-position="391">
<caret line="54" column="44" lean-forward="true" selection-start-line="54" selection-start-column="44" selection-end-line="54" selection-end-column="44" />
<folding>
<element signature="e#2655#2656#0" expanded="true" />
<element signature="e#3183#3184#0" expanded="true" />
<element signature="e#3238#3239#0" expanded="true" />
<element signature="e#3364#3365#0" expanded="true" />
<element signature="e#3419#3420#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/MainGUI.java">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/src/MainGUI.form">
<provider selected="true" editor-type-id="ui-designer" />
</entry>
</component>
<component name="masterDetails">
<states>

BIN
out/production/Alpha/Main.class

BIN
out/production/Alpha/Quiz_E.class

152
src/Quiz.java

@ -0,0 +1,152 @@
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.util.Random;
import javax.swing.JOptionPane;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Quiz extends JFrame {
JFrame fr = null;
JPanel contentPane = null;
JButton button1 = null;
JTextField j1 = null;
JLabel label1 = null;
JLabel label2 = null;
JLabel label3 = null;
JLabel frage1 = null;
JLabel frage1antworten1 = null;
JLabel frage2 = null;
JLabel frage1antworten2 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
int button1warsovielmalgedrückt = 0;
public Quiz() {
this.fr = new JFrame("GUI");
this.fr.setSize(430, 630);
this.contentPane = new JPanel();
this.fr.setContentPane(this.contentPane);
this.bar = new JMenuBar();
this.fr.setJMenuBar(bar);
this.mF = new JMenu("File");
this.mH = new JMenu("Help");
this.bar.add(mF);
this.bar.add(mH);
this.menuItem1 = new JMenuItem("Exit");
this.mF.add(menuItem1);
this.menuItem1.addActionListener(new CloseListener());
this.menuItem2 = new JMenuItem("Info");
this.mH.add(menuItem2);
this.menuItem2.addActionListener(new CloseListener3());
this.label1 = new JLabel("Herzlich willkommen zu unserem Quiz!");
this.contentPane.add(label1);
this.label2 = new JLabel("Beantworten Sie uns 5 kurze Fragen und gewinnen Sie 10000 Euro!");
this.contentPane.add(label2);
this.frage1 = new JLabel("Frage 1 lautet: Was gehört nicht zum Test Driven Developement?");
this.contentPane.add(frage1);
this.frage1antworten1 = new JLabel("A : Refactoring B : Transformation C : Clean Code D : Neuer Test ");
this.contentPane.add(frage1antworten1);
this.label3 = new JLabel("Antwort:");
this.contentPane.add(label3);
this.j1 = new JTextField("", 20);
this.contentPane.add(j1);
this.j1.setSize(250,30);;
this.button1 = new JButton("Prüfen");
this.contentPane.add(button1);
this.button1.addActionListener(new CloseListener2());
this.fr.setVisible(true);
}
public static void main(String[] args) {
Quiz g = new Quiz();
}
private class CloseListener implements ActionListener{
@Override
public void actionPerformed(ActionEvent e) {
System.exit(0);
}
}
public class CloseListener2 implements ActionListener{
@Override
public void actionPerformed(ActionEvent a) {
button1warsovielmalgedrückt++;
if(j1.getText().startsWith("C") || j1.getText().startsWith("c") ) {
System.out.println("ja");
j1.setText("Richtig ! Gewinn 1000 Euro");
JOptionPane.showMessageDialog(null,
"Herzlichen Glückwunsch , Sie sind nicht so dumm, wie ich dachte !",
"Eine Nachricht",
JOptionPane.WARNING_MESSAGE);
button1warsovielmalgedrückt++;
}else{
System.out.println("nein");
j1.setText("Falsch geantwortet! ");
}
}
}
public class CloseListener3 implements ActionListener{
@Override
public void actionPerformed(ActionEvent a) {
System.out.println("Hier sollen Sie Info bekommen");
}
}
}

107
src/Quiz_E.java

@ -1,107 +0,0 @@
import java.awt.JobAttributes;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import javax.swing.*;
public class Quiz_E {
JFrame fr = null;
JPanel contentPane = null;
JButton button1 = null;
JLabel label1 = null;
JLabel label2 = null;
JLabel label3 = null;
JLabel label4 = null;
JLabel label5 = null;
JLabel label6 = null;
JLabel label7 = null;
JTextField j1 = null;
JTextField j2 = null;
JTextField j3 = null;
JTextField j4 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JOptionPane opane = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
int button1warsovielmalgedrückt = 0;
public Quiz_E() {
this.fr = new JFrame("GUI");
this.fr.setSize(300, 900);
this.contentPane = new JPanel();
this.fr.setContentPane(this.contentPane);
this.bar = new JMenuBar();
this.fr.setJMenuBar(bar);
this.mF = new JMenu("File");
this.mH = new JMenu("Help");
this.bar.add(mF);
this.bar.add(mH);
this.menuItem1 = new JMenuItem("Exit");
this.mF.add(menuItem1);
this.menuItem2 = new JMenuItem("Info");
this.mH.add(menuItem2);
this.label4= new JLabel("Das spiel wird ihr Leben verändern.");
this.contentPane.add(label4);
this.label5= new JLabel("Wollen Sie erfahren, Wie viel Zeit bleibt dir in deinem Leben noch?");
this.contentPane.add(label5);
this.label1 = new JLabel("Wie ist Ihr Name?");
this.contentPane.add(label1);
this.j1 = new JTextField("", 20);
this.contentPane.add(j1);
this.j1.setSize(160,20);;
this.label2 = new JLabel("Wie alt sind Sie?");
this.contentPane.add(label2);
this.j2 = new JTextField("", 20);
this.contentPane.add(j2);
this.j2.setSize(160,20);
this.label3 = new JLabel("Was machen Sie beruflich?");
this.contentPane.add(label3);
this.j3 = new JTextField("", 20);
this.contentPane.add(j3);
this.button1 = new JButton("Erfahren");
this.contentPane.add(button1);
this.j4 = new JTextField("Sie sterben in ___ Jahren!");
this.contentPane.add(j4);
this.label6 = new JLabel("Die Wahrheit ist schwer zu ertragen.");
this.contentPane.add(label6);
this.label7 = new JLabel("ich hab eine Lösung für dich!");
this.contentPane.add(label7);
this.fr.setVisible(true);
}
public static void main(String[] args) {
Quiz_E q = new Quiz_E();
}
}
Loading…
Cancel
Save