Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.idea/workspace.xml
new_repo
Komlovski 5 years ago
parent
commit
dc21c09e1e
  1. 2
      .idea/misc.xml
  2. 177
      .idea/workspace.xml
  3. 19
      JunitTest/src/Tage_DTest.java
  4. 152
      src/Main.java
  5. 6
      src/Quiz_Spiel.java
  6. 97
      src/Tage_D.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_11" default="true" project-jdk-name="11" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

177
.idea/workspace.xml

@ -1,9 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<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="Entwicklung eines ButtonGroup Aktoren und der Verwendung der Klassen Quiz und Tage">
<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$/src/Main.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Main.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Quiz_Spiel.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Quiz_Spiel.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Tage_D.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Tage_D.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/bild.gif" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/pic.jpg" beforeDir="false" />
</list>
<ignored path="$PROJECT_DIR$/out/" />
<option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
@ -16,23 +21,41 @@
<option name="isMigrated" value="true" />
</component>
<component name="FileEditorManager">
<leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Quiz.java">
<leaf>
<file pinned="false" current-in-tab="true">
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-51">
<caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="10" selection-end-column="37" />
<state relative-caret-position="187">
<caret line="105" column="34" selection-start-line="105" selection-start-column="34" selection-end-line="105" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
</folding>
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="true">
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Quiz_Spiel.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="163">
<caret line="207" column="69" selection-start-line="207" selection-start-column="69" selection-end-line="207" selection-end-column="69" />
<state relative-caret-position="93">
<caret line="159" column="1" lean-forward="true" selection-start-line="159" selection-start-column="1" selection-end-line="163" selection-end-column="22" />
</state>
</provider>
</entry>
</file>
<file pinned="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="804">
<caret line="52" column="51" selection-start-line="52" selection-start-column="51" selection-end-line="52" selection-end-column="51" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3538#3539#0" expanded="true" />
<element signature="e#3591#3592#0" expanded="true" />
<element signature="e#3716#3717#0" expanded="true" />
<element signature="e#3771#3772#0" expanded="true" />
<element signature="e#3897#3898#0" expanded="true" />
<element signature="e#3952#3953#0" expanded="true" />
</folding>
</state>
</provider>
@ -54,15 +77,19 @@
<find>contantPane</find>
<find>ETools</find>
<find>this.</find>
<find>fr.</find>
<find>exit</find>
</findStrings>
<replaceStrings>
<replace>this.</replace>
<replace>this.panel</replace>
<replace>Panele</replace>
<replace>MTools</replace>
<replace>this.fr.</replace>
</replaceStrings>
</component>
<component name="Git.Settings">
<option name="UPDATE_TYPE" value="MERGE" />
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="IdeDocumentHistory">
@ -75,16 +102,15 @@
<option value="$PROJECT_DIR$/src/MainGUI.form" />
<option value="$PROJECT_DIR$/src/Tage_DTest.java" />
<option value="$PROJECT_DIR$/src/Tage_D.java" />
<option value="$PROJECT_DIR$/src/Main.java" />
<option value="$PROJECT_DIR$/src/Quiz.java" />
<option value="$PROJECT_DIR$/src/Quiz_Spiel.java" />
<option value="$PROJECT_DIR$/src/Main.java" />
</list>
</option>
</component>
<component name="ProjectFrameBounds" extendedState="6">
<option name="x" value="-7" />
<option name="width" value="974" />
<option name="height" value="1057" />
<option name="x" value="793" />
<option name="width" value="814" />
<option name="height" value="877" />
</component>
<component name="ProjectLevelVcsManager">
<ConfirmationsSetting value="2" id="Add" />
@ -94,6 +120,8 @@
<foldersAlwaysOnTop value="true" />
</navigator>
<panes>
<pane id="Scope" />
<pane id="PackagesPane" />
<pane id="ProjectPane">
<subPane>
<expand>
@ -121,8 +149,6 @@
<select />
</subPane>
</pane>
<pane id="Scope" />
<pane id="PackagesPane" />
</panes>
</component>
<component name="PropertiesComponent">
@ -132,9 +158,10 @@
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="Arquillian JUnit4" />
<property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.Arquillian JUnit4" value="" />
<property name="create.test.in.the.same.root" value="true" />
<property name="project.structure.last.edited" value="Modules" />
<property name="nodejs_package_manager_path" value="npm" />
<property name="project.structure.last.edited" value="Project" />
<property name="project.structure.proportion" value="0.15" />
<property name="project.structure.side.proportion" value="0.0" />
<property name="project.structure.side.proportion" value="0.2" />
<property name="restartRequiresConfirmation" value="false" />
<property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
</component>
@ -158,23 +185,23 @@
</list>
</option>
</component>
<component name="RunManager" selected="Application.Quiz_Spiel">
<configuration name="D_Test1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="D_Test1" />
<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" />
<module name="Alpha" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<configuration name="D_Test1" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="D_Test1" />
<module name="Alpha" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
<configuration name="Quiz" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Quiz" />
<configuration name="Main" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
<option name="MAIN_CLASS_NAME" value="Main" />
<module name="Alpha" />
<method v="2">
<option name="Make" enabled="true" />
@ -196,11 +223,11 @@
</configuration>
<recent_temporary>
<list>
<item itemvalue="Application.Quiz_Spiel" />
<item itemvalue="Application.Quiz" />
<item itemvalue="Application.Main" />
<item itemvalue="Application.Quiz_Spiel" />
<item itemvalue="Application.Tage_D" />
<item itemvalue="Application.D_Test1" />
<item itemvalue="Application.D_Geburtstag" />
</list>
</recent_temporary>
</component>
@ -224,8 +251,8 @@
<workItem from="1562718828390" duration="103000" />
<workItem from="1562781684319" duration="923000" />
<workItem from="1562789348995" duration="2654000" />
<workItem from="1562848572975" duration="3638000" />
<workItem from="1562855527862" duration="8587000" />
<workItem from="1562848572975" duration="6651000" />
<workItem from="1562856644601" duration="6634000" />
</task>
<task id="LOCAL-00001" summary="neue master">
<created>1562341097724</created>
@ -339,32 +366,32 @@
<option name="project" value="LOCAL" />
<updated>1562804715949</updated>
</task>
<task id="LOCAL-00017" summary="Funktion Prüfen Button Test">
<created>1562856294007</created>
<task id="LOCAL-00017" summary="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden">
<created>1562853765189</created>
<option name="number" value="00017" />
<option name="presentableId" value="LOCAL-00017" />
<option name="project" value="LOCAL" />
<updated>1562856294007</updated>
<updated>1562853765189</updated>
</task>
<task id="LOCAL-00018" summary="Update">
<created>1562862100994</created>
<task id="LOCAL-00018" summary="Entwicklung eines ButtonGroup Aktoren und der Verwendung der Klassen Quiz und Tage">
<created>1562861654490</created>
<option name="number" value="00018" />
<option name="presentableId" value="LOCAL-00018" />
<option name="project" value="LOCAL" />
<updated>1562862100994</updated>
<updated>1562861654490</updated>
</task>
<option name="localTasksCounter" value="19" />
<servers />
</component>
<component name="TimeTrackingManager">
<option name="totallyTimeSpent" value="28351000" />
<option name="totallyTimeSpent" value="29411000" />
</component>
<component name="ToolWindowManager">
<frame x="-8" y="-8" width="1382" height="784" extended-state="6" />
<frame x="-8" y="-8" width="1616" height="886" extended-state="6" />
<editor active="true" />
<layout>
<window_info content_ui="combo" id="Project" order="0" sideWeight="0.4977064" visible="true" weight="0.21406959" />
<window_info id="Structure" order="1" sideWeight="0.5022936" side_tool="true" visible="true" weight="0.21406959" />
<window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.14203085" />
<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" />
@ -373,13 +400,13 @@
<window_info anchor="bottom" id="Messages" order="0" weight="0.32802126" />
<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" visible="true" weight="0.33026114" />
<window_info anchor="bottom" id="Debug" order="4" weight="0.39978564" />
<window_info anchor="bottom" id="Run" order="3" visible="true" weight="0.33466136" />
<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" />
<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" weight="0.3290461" />
<window_info anchor="bottom" id="Version Control" order="9" weight="0.32802126" />
<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" side_tool="true" />
@ -406,9 +433,9 @@
<MESSAGE value="neue Tage Script" />
<MESSAGE value="neue GUI erstellt zum testen" />
<MESSAGE value="Junit für Tage_D erzeugt" />
<MESSAGE value="Funktion Prüfen Button Test" />
<MESSAGE value="Update" />
<option name="LAST_COMMIT_MESSAGE" value="Update" />
<MESSAGE value="Main Menü angepasst mit Auswahl und Action Listener erstellt. So das Unterklassen Objekte erzeugt werden" />
<MESSAGE value="Entwicklung eines ButtonGroup Aktoren und der Verwendung der Klassen Quiz und Tage" />
<option name="LAST_COMMIT_MESSAGE" value="Entwicklung eines ButtonGroup Aktoren und der Verwendung der Klassen Quiz und Tage" />
</component>
<component name="editorHistoryManager">
<entry file="file://$PROJECT_DIR$/src/testJFrame.java" />
@ -438,49 +465,67 @@
<entry file="file://$PROJECT_DIR$/src/MainGUI.form" />
<entry file="file://$PROJECT_DIR$/src/D_Test2.java" />
<entry file="file://$PROJECT_DIR$/src/D_Test3.java" />
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<entry file="file://$PROJECT_DIR$/JunitTest/JunitTest.iml">
<provider selected="true" editor-type-id="text-editor" />
</entry>
<entry file="file://$PROJECT_DIR$/JunitTest/src/Tage_DTest.java" />
<entry file="jar://C:/Program Files/Java/jdk1.8.0_111/src.zip!/javax/swing/JFrame.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="1275">
<caret line="79" column="55" lean-forward="true" selection-start-line="79" selection-start-column="55" selection-end-line="79" selection-end-column="55" />
<state relative-caret-position="151">
<caret line="697" column="22" selection-start-line="697" selection-start-column="22" selection-end-line="697" selection-end-column="22" />
<folding>
<element signature="e#2602#2603#0" expanded="true" />
<element signature="e#2655#2656#0" expanded="true" />
<element signature="e#2780#2781#0" expanded="true" />
<element signature="e#2835#2836#0" expanded="true" />
<element signature="e#2961#2962#0" expanded="true" />
<element signature="e#3016#3017#0" expanded="true" />
<element signature="e#24496#24497#0" expanded="true" />
<element signature="e#24553#24554#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/JunitTest/src/Tage_DTest.java">
<entry file="jar://C:/Program Files/Java/jdk1.8.0_111/src.zip!/javax/swing/JRootPane.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="85">
<caret line="5" column="23" selection-start-line="5" selection-start-column="23" selection-end-line="5" selection-end-column="23" />
<state relative-caret-position="814">
<caret line="620" column="18" selection-start-line="620" selection-start-column="18" selection-end-line="620" selection-end-column="18" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Main.java">
<entry file="file://$PROJECT_DIR$/src/bild.jpg">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/bild.gif">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/bild1.jpg">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/bild2.jpg">
<provider selected="true" editor-type-id="images" />
</entry>
<entry file="file://$PROJECT_DIR$/src/Tage_D.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="185">
<caret line="53" selection-start-line="53" selection-end-line="54" />
<state relative-caret-position="804">
<caret line="52" column="51" selection-start-line="52" selection-start-column="51" selection-end-line="52" selection-end-column="51" />
<folding>
<element signature="imports" expanded="true" />
<element signature="e#3538#3539#0" expanded="true" />
<element signature="e#3591#3592#0" expanded="true" />
<element signature="e#3716#3717#0" expanded="true" />
<element signature="e#3771#3772#0" expanded="true" />
<element signature="e#3897#3898#0" expanded="true" />
<element signature="e#3952#3953#0" expanded="true" />
</folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz.java">
<entry file="file://$PROJECT_DIR$/src/Quiz_Spiel.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="-51">
<caret line="9" lean-forward="true" selection-start-line="9" selection-end-line="10" selection-end-column="37" />
<state relative-caret-position="93">
<caret line="159" column="1" lean-forward="true" selection-start-line="159" selection-start-column="1" selection-end-line="163" selection-end-column="22" />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/src/Quiz_Spiel.java">
<entry file="file://$PROJECT_DIR$/src/Main.java">
<provider selected="true" editor-type-id="text-editor">
<state relative-caret-position="163">
<caret line="207" column="69" selection-start-line="207" selection-start-column="69" selection-end-line="207" selection-end-column="69" />
<state relative-caret-position="187">
<caret line="105" column="34" selection-start-line="105" selection-start-column="34" selection-end-line="105" selection-end-column="34" />
<folding>
<element signature="imports" expanded="true" />
</folding>

19
JunitTest/src/Tage_DTest.java

@ -1,19 +0,0 @@
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
@RunWith(Arquillian.class)
public class Tage_DTest {
@Deployment
public static JavaArchive createDeployment() {
return ShrinkWrap.create(JavaArchive.class)
.addClass(Tage_D.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
}
}

152
src/Main.java

@ -4,99 +4,135 @@ import java.awt.event.*;
public class Main {
//Variablen GUI
JButton button = null;
ImageIcon icon = null;
JFrame fr = null;
JMenuBar jmb = null;
JMenu jm = null;
JMenu jm1 = null;
JPanel contantPane = null;
JLabel label = null;
JMenuItem jmI = null;
JComboBox combobox_1;
JPanel Panele = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
JMenu mI = null;
//Konstruktor Gui
public Main(){
fr = new JFrame("Coutinius Integration SS 2019");
fr.setSize(600,900);
fr.setSize(400,400);
fr.setFont(new Font("Helvetica", Font.PLAIN, 12));
fr.setLayout(new FlowLayout());
jmb = new JMenuBar();
fr.setJMenuBar(jmb);
jm = new JMenu("Menu");
jmb.add(jm);
jmI = new JMenuItem("Exit");
jm.add(jmI);
jmI.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
Panele = new JPanel();
System.exit(-1);
}
});
jm1 = new JMenu("Info");
jmb.add(jm1);
fr.setContentPane(Panele);
contantPane = new JPanel();
bar = new JMenuBar();
fr.setJMenuBar(bar);
mF = new JMenu("File");
mH = new JMenu("Help");
mI = new JMenu("Info");
bar.add(mF);
bar.add(mH);
bar.add(mI);
fr.setContentPane(contantPane);
menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
contantPane.add(new JLabel("Ein Tool der CI!"));
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
contantPane.add(new JLabel("Tools von Daniel, Eugen, Michael"));
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
ButtonGroup buttonGroup = new ButtonGroup();
}
});
fr.addWindowListener(new WindowAdapter() {
this.fr.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(0);
System.exit(-1);
}
});
combobox_1 = new JComboBox();
combobox_1.addItem("Daniels Tools");
combobox_1.addItem("Eugen Tools");
combobox_1.addItem("Michaels Tools");
fr.add(combobox_1);
fr.setContentPane(Panele);
JRadioButton DTools = new JRadioButton("Daniels Tools"); DTools.setBounds(100, 100, 100, 20);
buttonGroup.add(DTools); contantPane.add(DTools);
JRadioButton ETools = new JRadioButton("Eugen Tools"); ETools.setBounds(200, 100, 100, 20);
buttonGroup.add(ETools); contantPane.add(ETools);
JRadioButton MTools = new JRadioButton("Eugen Tools"); MTools.setBounds(300, 100, 100, 20);
buttonGroup.add(MTools); contantPane.add(MTools);
Panele.add(new JLabel("CI Tools von "));
JLabel auswahl = new JLabel("Ihre Auswahl:");
auswahl.setBounds(10, 200, 100, 20);
contantPane.add(auswahl);
final JTextField text1 = new JTextField("..Bisher keine Auswahl!..");
text1.setBounds(100, 200, 300, 20);
contantPane.add(text1);
ButtonGroup buttonGroup = new ButtonGroup();
JButton DTools = new JButton("Daniel"); DTools.setBounds(100, 100, 100, 20);
buttonGroup.add(DTools); Panele.add(DTools);
JButton ETools = new JButton("Eugen"); ETools.setBounds(200, 200, 100, 20);
buttonGroup.add(ETools); Panele.add(ETools);
JButton MTools = new JButton("Michael"); MTools.setBounds(300, 300, 100, 20);
buttonGroup.add(MTools); Panele.add(MTools);
DTools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Daniel Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Daniels Tools");
fr.setVisible(false);
Tage_D gb = new Tage_D();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Daniels Tools");
}
}
});
ETools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Eugens Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Eugens Tools");
//fr.setVisible(false);
Quiz_Spiel window = new Quiz_Spiel();
window.setTitle("Quiz_Spiel");
window.pack();
window.show();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Eugens Tools");
}
}
});
MTools.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("Michaels Tools");
try {
JOptionPane.showMessageDialog(fr, "Aufruf von Michaels Tools");
fr.setVisible(false);
Quiz qwqqq = new Quiz();
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Michaels Tools");
}
}
});
contantPane.setVisible(true);
fr.setVisible(true);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Panele.setVisible(true);
this.fr.setVisible(true);
this.fr.setAlwaysOnTop(true);
this.fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public static void main(String[] args) {
@ -104,12 +140,4 @@ public class Main {
}
}
}

6
src/Quiz_Spiel.java

@ -157,12 +157,6 @@ public class Quiz_Spiel extends JFrame {
}
});
}
public static void main(String args[]) {

97
src/Tage_D.java

@ -3,58 +3,86 @@ import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JOptionPane;
import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import java.util.concurrent.ThreadLocalRandom;
public class Tage_D extends JFrame {
Icon icon1,icon2,icon3;
JLabel bild1,bild2,bild3;
JFrame fr = null;
JPanel Panele = 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;
JLabel label8 = null;
JLabel label9 = null;
JLabel labe20 = null;
JTextField j1 = null;
JTextField j2 = null;
JTextField j3 = null;
JTextField j4 = null;
JTextField j5 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
JOptionPane opane = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
JMenu mI = null;
int button1warsovielmalgedrückt = 0;
public Tage_D() {
fr = new JFrame("GUI");
fr.setSize(350, 700);
fr = new JFrame("Coutinius Integration SS 2019");
fr.setSize(600,800);
fr.setFont(new Font("Helvetica", Font.PLAIN, 12));
fr.setLayout(new FlowLayout());
Panele = new JPanel();
fr.setContentPane(Panele);
bar = new JMenuBar();
fr.setJMenuBar(bar);
mF = new JMenu("File");
mH = new JMenu("Help");
mI = new JMenu("Info");
bar.add(mF);
bar.add(mH);
bar.add(mI);
menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
menuItem2 = new JMenuItem("Info"); mH.add(menuItem2);
menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
}
});
j1 = new JTextField("Ein Tool der CI"); j1.setEditable(false); j1.setSize(450,30); ; Panele.add(j1);
j2 = new JTextField("Tools von Daniel Hauch"); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
j3 = new JTextField("Wie ist Ihr Name?"); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
this.fr.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.exit(-1);
}
});
fr.setContentPane(Panele);
/*
icon1 = new ImageIcon(getClass().getResource("bild1.jpg")); bild1 = new JLabel(icon1); fr.add(icon1);
icon2 = new ImageIcon(getClass().getResource("bild2.jpg")); bild2 = new JLabel(icon2); fr.add(icon2);
icon3 = new ImageIcon(getClass().getResource("bild3.gif")); bild3 = new JLabel(icon3); fr.add(icon3);
*/
j1 = new JTextField("Tools von Daniel Hauch"); j1.setEditable(false); j1.setSize(450,30); ; Panele.add(j1);
j2 = new JTextField("Wie ist Ihr Name?"); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
j3 = new JTextField(""); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
button1 = new JButton("Erfahren"); Panele.add(button1);
@ -62,21 +90,21 @@ public class Tage_D extends JFrame {
ButtonGroup buttonGroup = new ButtonGroup();
JRadioButton hzeit = new JRadioButton("Hochzeit");
hzeit.setBounds(100, 170, 100, 20);
buttonGroup.add(hzeit); this.Panele.add(hzeit);
JRadioButton gtag = new JRadioButton("Geburtstag");
JButton szeit= new JButton("Sterbezeitpunkt");
szeit.setBounds(100, 170, 100, 20);
buttonGroup.add(szeit); Panele.add(szeit);
JButton gtag = new JButton("zufällige Alter ausrechnen");
gtag.setBounds(250, 170, 100, 20);
buttonGroup.add(gtag); this.Panele.add(gtag);
buttonGroup.add(gtag); Panele.add(gtag);
JLabel auswahl = new JLabel("Ihre Auswahl:");
auswahl.setBounds(10, 200, 100, 20);
this.Panele.add(auswahl);
final JTextField text1 = new JTextField();
Panele.add(auswahl);
final JTextField text1 = new JTextField("");
text1.setBounds(100, 200, 300, 20);
this.Panele.add(text1);
Panele.add(text1);
hzeit.addActionListener(new ActionListener() {
szeit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
text1.setText("MALE");
}
@ -95,17 +123,12 @@ public class Tage_D extends JFrame {
}
});
this.fr.setVisible(true);
this.fr.setAlwaysOnTop(true);
}
public static void main(String[] args) {
Tage_D gb = new Tage_D();
fr.setVisible(true);
fr.setAlwaysOnTop(true);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
Loading…
Cancel
Save