Browse Source

Beginn mit Quiz Spiel.

//erste Giu elemente
new_repo
Komlovski 5 years ago
parent
commit
895a84b18b
  1. 200
      .idea/workspace.xml
  2. 80
      src/Quiz_E.java

200
.idea/workspace.xml

@ -2,11 +2,8 @@
<project version="4"> <project version="4">
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment=""> <list default="true" id="41dc023d-0769-466f-850a-8e3eed9fe5fa" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/Quiz_E.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.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/Main$1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Alpha/Main$1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Alpha/Main$ActionListener1.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Alpha/Main$ActionListener1.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/out/production/Alpha/Main.class" beforeDir="false" afterPath="$PROJECT_DIR$/out/production/Alpha/Main.class" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
</list> </list>
<ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -20,36 +17,61 @@
</component> </component>
<component name="FileEditorManager"> <component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Main.java"> <entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="43" column="36" selection-start-line="43" selection-start-column="36" selection-end-line="43" selection-end-column="36" />
<state relative-caret-position="355">
<caret line="93" selection-start-line="93" selection-end-line="93" />
<folding> <folding>
<element signature="e#1544#1545#0" expanded="true" />
<element signature="e#1598#1599#0" expanded="true" />
<element signature="e#1725#1726#0" expanded="true" />
<element signature="e#1781#1782#0" expanded="true" />
<element signature="imports" expanded="true" />
<element signature="e#1752#1753#0" expanded="true" />
<element signature="e#1805#1806#0" expanded="true" />
<element signature="e#1930#1931#0" expanded="true" />
<element signature="e#1985#1986#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/D_Test1.java">
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Quiz_E.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="30" column="41" selection-start-line="30" selection-start-column="41" selection-end-line="30" selection-end-column="41" />
<state relative-caret-position="49">
<caret line="66" column="40" lean-forward="true" selection-start-line="66" selection-start-column="40" selection-end-line="66" selection-end-column="40" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#191#192#0" expanded="true" />
<element signature="e#1397#1398#0" expanded="true" />
<element signature="e#1600#1601#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
</file> </file>
<file pinned="false" current-in-tab="false">
<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>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/D_Test3.java">
<provider selected="true" editor-type-id="text-editor">
<state>
<caret column="13" selection-start-column="13" selection-end-column="13" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/D_Geburtstag.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" selection-start-line="8" selection-end-line="8" />
</state>
</provider>
</entry>
</file>
</leaf> </leaf>
</component> </component>
<component name="FileTemplateManagerImpl"> <component name="FileTemplateManagerImpl">
@ -70,6 +92,9 @@
<option value="$PROJECT_DIR$/src/geburtstag.java" /> <option value="$PROJECT_DIR$/src/geburtstag.java" />
<option value="$PROJECT_DIR$/src/Geburtstag.java" /> <option value="$PROJECT_DIR$/src/Geburtstag.java" />
<option value="$PROJECT_DIR$/src/Main.java" /> <option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/TicTakToc_E_K.java" />
<option value="$PROJECT_DIR$/src/Quiz.java" />
<option value="$PROJECT_DIR$/src/Quiz_E.java" />
</list> </list>
</option> </option>
</component> </component>
@ -127,37 +152,37 @@
</list> </list>
</option> </option>
</component> </component>
<component name="RunManager" selected="Application.Main">
<configuration name="D_Geburtstag" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="D_Geburtstag" />
<component name="RunManager" selected="Application.Quiz_E">
<configuration name="TicTakToc_E_K" type="Applet" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="TicTakToc_E_K" />
<module name="Alpha" /> <module name="Alpha" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="D_Test1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="D_Test1" />
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<module name="Alpha" /> <module name="Alpha" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<configuration name="Quiz" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Quiz" />
<module name="Alpha" /> <module name="Alpha" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="fenster" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="fenster" />
<configuration name="Quiz_E" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Quiz_E" />
<module name="Alpha" /> <module name="Alpha" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
</method> </method>
</configuration> </configuration>
<configuration name="main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="main" />
<configuration name="TicTakToc_E_K" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="TicTakToc_E_K" />
<module name="Alpha" /> <module name="Alpha" />
<method v="2"> <method v="2">
<option name="Make" enabled="true" /> <option name="Make" enabled="true" />
@ -165,11 +190,11 @@
</configuration> </configuration>
<recent_temporary> <recent_temporary>
<list> <list>
<item itemvalue="Application.Quiz_E" />
<item itemvalue="Application.Quiz" />
<item itemvalue="Applet.TicTakToc_E_K" />
<item itemvalue="Application.TicTakToc_E_K" />
<item itemvalue="Application.Main" /> <item itemvalue="Application.Main" />
<item itemvalue="Application.D_Test1" />
<item itemvalue="Application.D_Geburtstag" />
<item itemvalue="Application.main" />
<item itemvalue="Application.fenster" />
</list> </list>
</recent_temporary> </recent_temporary>
</component> </component>
@ -188,6 +213,8 @@
<workItem from="1562343569757" duration="85000" /> <workItem from="1562343569757" duration="85000" />
<workItem from="1562343774281" duration="2056000" /> <workItem from="1562343774281" duration="2056000" />
<workItem from="1562347057096" duration="199000" /> <workItem from="1562347057096" duration="199000" />
<workItem from="1562363354568" duration="615000" />
<workItem from="1562414362573" duration="593000" />
</task> </task>
<task id="LOCAL-00001" summary="neue master"> <task id="LOCAL-00001" summary="neue master">
<created>1562341097724</created> <created>1562341097724</created>
@ -249,23 +276,23 @@
<servers /> <servers />
</component> </component>
<component name="TimeTrackingManager"> <component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="5738000" />
<option name="totallyTimeSpent" value="10758000" />
</component> </component>
<component name="ToolWindowManager"> <component name="ToolWindowManager">
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<frame x="-8" y="-8" width="1382" height="784" extended-state="6" />
<editor active="true" /> <editor active="true" />
<layout> <layout>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.17287917" />
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.2655068" />
<window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" />
<window_info id="Image Layers" order="2" /> <window_info id="Image Layers" order="2" />
<window_info id="Designer" order="3" /> <window_info id="Designer" order="3" />
<window_info id="UI Designer" order="4" /> <window_info id="UI Designer" order="4" />
<window_info id="Capture Tool" order="5" /> <window_info id="Capture Tool" order="5" />
<window_info id="Favorites" order="6" side_tool="true" /> <window_info id="Favorites" order="6" side_tool="true" />
<window_info anchor="bottom" id="Messages" order="0" weight="0.32934928" />
<window_info anchor="bottom" id="Messages" order="0" sideWeight="0.4977307" weight="0.32872504" />
<window_info anchor="bottom" id="Message" order="1" /> <window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" /> <window_info anchor="bottom" id="Find" order="2" />
<window_info active="true" anchor="bottom" id="Run" order="3" visible="true" weight="0.32934928" />
<window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.4969743" visible="true" weight="0.32872504" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.4" /> <window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" /> <window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" /> <window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
@ -274,7 +301,7 @@
<window_info anchor="bottom" id="Version Control" order="9" /> <window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Database Changes" order="10" /> <window_info anchor="bottom" id="Database Changes" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.32934928" /> <window_info anchor="bottom" id="Terminal" order="11" weight="0.32934928" />
<window_info anchor="bottom" id="Event Log" order="12" side_tool="true" />
<window_info anchor="bottom" id="Event Log" order="12" sideWeight="0.5030257" side_tool="true" visible="true" weight="0.32872504" />
<window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> <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" /> <window_info anchor="right" id="Ant Build" order="1" weight="0.25" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
@ -285,6 +312,37 @@
<window_info anchor="right" id="Palette&#9;" order="7" /> <window_info anchor="right" id="Palette&#9;" order="7" />
<window_info anchor="right" id="Database" order="8" /> <window_info anchor="right" id="Database" order="8" />
</layout> </layout>
<layout-to-restore>
<window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.25416037" />
<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" />
<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" weight="0.32934928" />
<window_info anchor="bottom" id="Message" order="1" />
<window_info anchor="bottom" id="Find" order="2" />
<window_info active="true" anchor="bottom" id="Run" order="3" sideWeight="0.49924356" visible="true" weight="0.32872504" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.4" />
<window_info anchor="bottom" id="Cvs" order="5" weight="0.25" />
<window_info anchor="bottom" id="Inspection" order="6" weight="0.4" />
<window_info anchor="bottom" id="TODO" order="7" />
<window_info anchor="bottom" id="Docker" order="8" show_stripe_button="false" />
<window_info anchor="bottom" id="Version Control" order="9" />
<window_info anchor="bottom" id="Database Changes" order="10" />
<window_info anchor="bottom" id="Terminal" order="11" weight="0.32934928" />
<window_info anchor="bottom" id="Event Log" order="12" sideWeight="0.50075644" side_tool="true" visible="true" weight="0.32872504" />
<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" />
<window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" />
<window_info anchor="right" id="Palette" order="3" />
<window_info anchor="right" id="Theme Preview" order="4" />
<window_info anchor="right" id="Maven" order="5" />
<window_info anchor="right" id="Capture Analysis" order="6" />
<window_info anchor="right" id="Palette&#9;" order="7" />
<window_info anchor="right" id="Database" order="8" />
</layout-to-restore>
</component> </component>
<component name="TypeScriptGeneratedFilesManager"> <component name="TypeScriptGeneratedFilesManager">
<option name="version" value="1" /> <option name="version" value="1" />
@ -296,6 +354,9 @@
<MESSAGE value="junit klassen erst mal entfernen" /> <MESSAGE value="junit klassen erst mal entfernen" />
<option name="LAST_COMMIT_MESSAGE" value="junit klassen erst mal entfernen" /> <option name="LAST_COMMIT_MESSAGE" value="junit klassen erst mal entfernen" />
</component> </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" />
</component>
<component name="editorHistoryManager"> <component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/testJFrame.java" /> <entry file="file://$PROJECT_DIR$/src/testJFrame.java" />
<entry file="file://$PROJECT_DIR$/src/fenster.java" /> <entry file="file://$PROJECT_DIR$/src/fenster.java" />
@ -303,13 +364,6 @@
<provider selected="true" editor-type-id="text-editor" /> <provider selected="true" editor-type-id="text-editor" />
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/TestBmi.java" /> <entry file="file://$PROJECT_DIR$/src/TestBmi.java" />
<entry file="file://$PROJECT_DIR$/src/D_Geburtstag.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="255">
<caret line="15" selection-start-line="15" selection-end-line="15" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test.java" /> <entry file="file://$PROJECT_DIR$/src/D_Test.java" />
<entry file="file://$PROJECT_DIR$/src/M_Test.java" /> <entry file="file://$PROJECT_DIR$/src/M_Test.java" />
<entry file="file://$PROJECT_DIR$/src/E_Test.java" /> <entry file="file://$PROJECT_DIR$/src/E_Test.java" />
@ -325,28 +379,58 @@
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/D_Test1.java">
<entry file="file://$PROJECT_DIR$/src/D_Test1.java" />
<entry file="file://$PROJECT_DIR$/src/D_Test2.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="408">
<caret line="30" column="41" selection-start-line="30" selection-start-column="41" selection-end-line="30" selection-end-column="41" />
<state>
<caret column="13" selection-start-column="13" selection-end-column="13" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/D_Test3.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">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="136">
<caret line="8" selection-start-line="8" selection-end-line="8" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="17">
<caret line="17" column="2" lean-forward="true" selection-start-line="17" selection-start-column="2" selection-end-line="17" selection-end-column="9" />
<folding> <folding>
<element signature="imports" expanded="true" /> <element signature="imports" expanded="true" />
<element signature="e#191#192#0" expanded="true" />
<element signature="e#1397#1398#0" expanded="true" />
<element signature="e#1600#1601#0" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>
</entry> </entry>
<entry file="file://$PROJECT_DIR$/src/Main.java"> <entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor"> <provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="187">
<caret line="43" column="36" selection-start-line="43" selection-start-column="36" selection-end-line="43" selection-end-column="36" />
<state relative-caret-position="355">
<caret line="93" selection-start-line="93" selection-end-line="93" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#1752#1753#0" expanded="true" />
<element signature="e#1805#1806#0" expanded="true" />
<element signature="e#1930#1931#0" expanded="true" />
<element signature="e#1985#1986#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz_E.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="49">
<caret line="66" column="40" lean-forward="true" selection-start-line="66" selection-start-column="40" selection-end-line="66" selection-end-column="40" />
<folding> <folding>
<element signature="e#1544#1545#0" expanded="true" />
<element signature="e#1598#1599#0" expanded="true" />
<element signature="e#1725#1726#0" expanded="true" />
<element signature="e#1781#1782#0" expanded="true" />
<element signature="imports" expanded="true" />
</folding> </folding>
</state> </state>
</provider> </provider>

80
src/Quiz_E.java

@ -0,0 +1,80 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
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;
JTextField j1 = null;
JTextField j2 = null;
JTextField j3 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = 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(750, 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.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.fr.setVisible(true);
}
public static void main(String[] args) {
Quiz_E q = new Quiz_E();
}
}
Loading…
Cancel
Save