diff --git a/.idea/misc.xml b/.idea/misc.xml
index e0844bc..0548357 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -1,6 +1,6 @@
-
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 00269fe..5f633b1 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -1,9 +1,14 @@
-
+
+
+
+
+
+
@@ -16,23 +21,41 @@
-
-
-
+
+
+
-
-
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -54,15 +77,19 @@
contantPane
ETools
this.
+ fr.
+ exit
this.
this.panel
Panele
MTools
+ this.fr.
+
@@ -75,16 +102,15 @@
-
-
+
-
-
-
+
+
+
@@ -94,6 +120,8 @@
+
+
@@ -121,8 +149,6 @@
-
-
@@ -132,9 +158,10 @@
-
+
+
-
+
@@ -158,23 +185,23 @@
-
-
-
+
+
+
-
-
+
+
-
-
+
+
@@ -196,11 +223,11 @@
-
-
+
+
@@ -224,8 +251,8 @@
-
-
+
+
1562341097724
@@ -339,32 +366,32 @@
1562804715949
-
- 1562856294007
+
+ 1562853765189
- 1562856294007
+ 1562853765189
-
- 1562862100994
+
+ 1562861654490
- 1562862100994
+ 1562861654490
-
+
-
+
-
-
+
+
@@ -373,13 +400,13 @@
-
-
+
+
-
+
@@ -406,9 +433,9 @@
-
-
-
+
+
+
@@ -438,49 +465,67 @@
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
+
+
-
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
diff --git a/JunitTest/src/Tage_DTest.java b/JunitTest/src/Tage_DTest.java
deleted file mode 100644
index 2d3a654..0000000
--- a/JunitTest/src/Tage_DTest.java
+++ /dev/null
@@ -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");
- }
-
-}
diff --git a/src/Main.java b/src/Main.java
index 85efd13..402b1a1 100644
--- a/src/Main.java
+++ b/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 {
}
-
-}
-
-
-
-
-
-
-
+}
\ No newline at end of file
diff --git a/src/Quiz_Spiel.java b/src/Quiz_Spiel.java
index d354430..370e5c6 100644
--- a/src/Quiz_Spiel.java
+++ b/src/Quiz_Spiel.java
@@ -157,12 +157,6 @@ public class Quiz_Spiel extends JFrame {
}
});
-
-
-
-
-
-
}
public static void main(String args[]) {
diff --git a/src/Tage_D.java b/src/Tage_D.java
index 92fdee5..7ce5c30 100644
--- a/src/Tage_D.java
+++ b/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);
}
}
+