Browse Source

Quiz Spiel. Änderungen

new_repo
Komlovski 5 years ago
parent
commit
4974caf788
  1. 29
      .idea/workspace.xml
  2. 20
      src/Quiz.java

29
.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$/out/production/Alpha/Main.class" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/Quiz.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.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/Quiz_E.class" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Quiz_E.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/Quiz.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Quiz.java" afterDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -39,8 +35,8 @@
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Quiz.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="105" column="40" selection-start-line="105" selection-start-column="40" selection-end-line="105" selection-end-column="40" />
<state relative-caret-position="236">
<caret line="63" column="33" lean-forward="true" selection-start-line="63" selection-start-column="33" selection-end-line="63" selection-end-column="33" />
<folding>
<element signature="imports" expanded="true" />
</folding>
@ -131,6 +127,7 @@
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="aspect.path.notification.shown" value="true" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.0" />
@ -274,11 +271,18 @@
<option name="project" value="LOCAL" />
<updated>1562415232279</updated>
</task>
<option name="localTasksCounter" value="10" />
<task id="LOCAL-00010" summary="Quiz Spiel. 1 Frage und Antwort">
<created>1562611989228</created>
<option name="number" value="00010" />
<option name="presentableId" value="LOCAL-00010" />
<option name="project" value="LOCAL" />
<updated>1562611989228</updated>
</task>
<option name="localTasksCounter" value="11" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="15788000" />
<option name="totallyTimeSpent" value="17817000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="784" extended-state="6" />
@ -355,7 +359,8 @@
<MESSAGE value="Main bereinigt" />
<MESSAGE value="junit klassen erst mal entfernen" />
<MESSAGE value="Beginn mit Quiz Spiel.&#10;//erste Giu elemente" />
<option name="LAST_COMMIT_MESSAGE" value="Beginn mit Quiz Spiel.&#10;//erste Giu elemente" />
<MESSAGE value="Quiz Spiel. 1 Frage und Antwort" />
<option name="LAST_COMMIT_MESSAGE" value="Quiz Spiel. 1 Frage und Antwort" />
</component>
<component name="com.intellij.coverage.CoverageDataManagerImpl">
<SUITE FILE_PATH="coverage/Alpha$Quiz.ic" NAME="Quiz Coverage Results" MODIFIED="1562358075708" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="idea" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" />
@ -420,8 +425,8 @@
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="204">
<caret line="105" column="40" selection-start-line="105" selection-start-column="40" selection-end-line="105" selection-end-column="40" />
<state relative-caret-position="236">
<caret line="63" column="33" lean-forward="true" selection-start-line="63" selection-start-column="33" selection-end-line="63" selection-end-column="33" />
<folding>
<element signature="imports" expanded="true" />
</folding>

20
src/Quiz.java

@ -1,3 +1,4 @@
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.JFrame;
@ -21,8 +22,9 @@ public class Quiz extends JFrame {
JLabel label2 = null;
JLabel label3 = null;
JLabel frage1 = null;
JLabel frage1antworten = null;
JLabel frage1antworten1 = null;
JLabel frage2 = null;
JLabel frage1antworten2 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
@ -64,11 +66,15 @@ public class Quiz extends JFrame {
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.frage1antworten = new JLabel("A : Refactoring B : Transformation C : Clean Code D : Neuer Test ");
this.contentPane.add(frage1antworten);
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);
@ -78,6 +84,8 @@ public class Quiz extends JFrame {
this.button1 = new JButton("Prüfen");
this.contentPane.add(button1);
this.button1.addActionListener(new CloseListener2());
@ -106,6 +114,10 @@ public class Quiz extends JFrame {
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{

Loading…
Cancel
Save