diff --git a/.idea/libraries/Drools_6_2_0.xml b/.idea/libraries/Drools_6_2_0.xml
new file mode 100644
index 0000000..51bdc0e
--- /dev/null
+++ b/.idea/libraries/Drools_6_2_0.xml
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
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 7726e9c..e5af921 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,10 +2,13 @@
-
-
+
+
-
+
+
+
+
@@ -19,32 +22,11 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -52,11 +34,11 @@
-
+
-
-
+
+
@@ -104,18 +86,17 @@
+
-
-
-
+
-
-
-
+
+
+
@@ -125,8 +106,6 @@
-
-
@@ -148,6 +127,8 @@
+
+
@@ -167,7 +148,7 @@
-
+
@@ -189,7 +170,14 @@
-
+
+
+
+
+
+
+
+
@@ -218,23 +206,13 @@
-
-
-
-
-
-
-
-
-
-
-
+
@@ -262,8 +240,6 @@
-
-
1562341097724
@@ -412,49 +388,29 @@
1562934759261
-
- 1563187501151
-
-
-
- 1563187501151
-
-
- 1563187869684
-
-
-
- 1563187869684
-
-
- 1563212329500
-
-
-
- 1563212329500
-
-
+
-
+
-
+
-
+
-
+
+
-
-
-
+
+
+
@@ -462,7 +418,8 @@
-
+
+
@@ -473,6 +430,39 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -491,10 +481,8 @@
-
-
-
-
+
+
@@ -524,69 +512,74 @@
+
+
+
-
-
-
-
-
-
-
-
+
-
-
+
+
-
+
+
-
+
-
-
-
-
-
+
+
-
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
+
+
+
diff --git a/Alpha.iml b/Alpha.iml
index fd8c891..a0088ce 100644
--- a/Alpha.iml
+++ b/Alpha.iml
@@ -42,5 +42,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
index 5bf9ec8..e49e1bc 100644
--- a/src/Main.java
+++ b/src/Main.java
@@ -12,6 +12,7 @@ public class Main {
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
+ JMenuItem menuItem3 = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
@@ -38,30 +39,48 @@ public class Main {
bar.add(mH);
bar.add(mI);
- menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
- menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
+ menuItem1 = new JMenuItem("Hauptprogramm"); mF.add(menuItem1);
+ menuItem2 = new JMenuItem("Exit"); mF.add(menuItem2);
+ menuItem3 = new JMenuItem("Über"); mI.add(menuItem3);
+
menuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
- System.exit(-1);
+ JOptionPane.showMessageDialog(fr, "Wir wechseln zum Hauptprogramm");
+
+ Main mn = new Main();
+ fr.setVisible((false));
+ Panele.setVisible(false);
+ mn.fr.setVisible(true);
+ //System.exit(0);
+
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
-
}
});
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
- JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
+ System.exit(-1);
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
+ }
+ });
+ menuItem3.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");
+ }
}
});
@@ -71,10 +90,7 @@ public class Main {
}
});
-
-
Panele.add(new JLabel("CI Tools von "));
-
ButtonGroup buttonGroup = new ButtonGroup();
JButton DTools = new JButton("Daniel"); DTools.setBounds(100, 100, 100, 40);
@@ -94,11 +110,9 @@ public class Main {
fr.setVisible(false);
Tage_D gb = new Tage_D();
-
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Daniels Tools");
}
-
}
});
@@ -108,18 +122,14 @@ public class Main {
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");
}
-
}
});
@@ -135,13 +145,11 @@ public class Main {
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler beim Aufruf von Michaels Tools");
}
-
}
});
Panele.setVisible(true);
this.fr.setVisible(true);
- this.fr.setAlwaysOnTop(true);
this.fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
@@ -149,5 +157,4 @@ public class Main {
Main mn = new Main();
}
-
}
\ No newline at end of file
diff --git a/src/Tage_D.java b/src/Tage_D.java
index 4023b2d..c9f224d 100644
--- a/src/Tage_D.java
+++ b/src/Tage_D.java
@@ -15,20 +15,17 @@ public class Tage_D extends JFrame {
JFrame fr = null;
JPanel Panele = null;
- JButton button1 = null;
JTextField j1 = null;
JTextField j2 = null;
JTextField j3 = null;
JTextField j4 = null;
- JTextField j5 = null;
- JTextField j6 = null;
JMenuItem menuItem1 = null;
JMenuItem menuItem2 = null;
+ JMenuItem menuItem3 = null;
JMenuBar bar =null;
JMenu mF= null;
JMenu mH = null;
JMenu mI = null;
- Date datum = null;
public Tage_D() {
@@ -38,10 +35,8 @@ public class Tage_D extends JFrame {
fr.setLayout(new FlowLayout());
Panele = new JPanel();
-
fr.setContentPane(Panele);
-
bar = new JMenuBar();
fr.setJMenuBar(bar);
mF = new JMenu("File");
@@ -51,30 +46,45 @@ public class Tage_D extends JFrame {
bar.add(mH);
bar.add(mI);
- menuItem1 = new JMenuItem("Exit"); mF.add(menuItem1);
- menuItem2 = new JMenuItem("Über"); mI.add(menuItem2);
+ menuItem1 = new JMenuItem("Hauptprogramm"); mF.add(menuItem1);
+ menuItem2 = new JMenuItem("Exit"); mF.add(menuItem2);
+ menuItem3 = new JMenuItem("Über"); mI.add(menuItem3);
menuItem1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
- System.exit(-1);
+ JOptionPane.showMessageDialog(fr, "Wir wechseln zum Hauptprogramm");
+ Main mn = new Main();
+ fr.setVisible((false));
+ Panele.setVisible(false);
+ mn.fr.setVisible(true);
+ //System.exit(0);
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
-
}
});
menuItem2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ie) {
try {
- JOptionPane.showMessageDialog(fr, "Tools entwickelt für CI 2019 Copyright by DEM Consulting");
+ System.exit(-1);
}catch (Exception ex) {
JOptionPane.showMessageDialog(null, "Fehler");
}
+ }
+ });
+ menuItem3.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");
+ }
}
});
@@ -84,21 +94,12 @@ public class Tage_D extends JFrame {
}
});
-
-
Date datum=new Date();
- int year=datum.getYear() + 1900;
-
- /*
- 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); ; bar.add(j1);
- j2 = new JTextField("Geben Sie hier jeweils nach Auswahl: Geburtsjahr, Hohchzeitsjahr, aktuelles Jahr ein! Bsp. 1969"); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
- j3 = new JTextField("1969"); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
+ int year=datum.getYear() + 1900;
+ j1 = new JTextField("Tools von Daniel Hauch",10); j1.setEditable(false); j1.setSize(450,30); ; bar.add(j1);
+ j2 = new JTextField("Geben Sie hier jeweils nach Auswahl: Geburtsjahr, Hohchzeitsjahr, aktuelles Jahr ein! Bsp. 1969",50); j2.setEditable(false); Panele.add(j2); j2.setSize(450,30); Panele.add(j2);
+ j3 = new JTextField("1969",10); j3.setEditable(true); Panele.add(j2); j3.setSize(450,30); Panele.add(j3);
ButtonGroup buttonGroup = new ButtonGroup();
JButton szeit= new JButton("Sterbezeitpunkt Erfahren");
@@ -109,9 +110,7 @@ public class Tage_D extends JFrame {
public void actionPerformed(ActionEvent ie) {
int ergebnis, zufall, zahl, i;
-
zahl = Integer.parseInt(j3.getText());
-
zufall= gibZufall(zahl);
while(zufall<=year){
@@ -121,7 +120,6 @@ public class Tage_D extends JFrame {
}
String resultat = new String("Sie werden im Jahre "+zufall+" möglicherweise sterben!");
j4.setText(resultat);
-
}
});
@@ -134,25 +132,18 @@ public class Tage_D extends JFrame {
public void actionPerformed(ActionEvent ie) {
int diamant, gold, silber, zufall, zahl, i;
-
zahl = Integer.parseInt(j3.getText());
-
diamant=zahl+60;
gold=zahl+50;
silber=zahl+25;
-
String resultat = new String("Sie werden im Jahr "+silber+" Ihre Silberhochzeit, im Jahr "+gold+" Ihre Goldene Hochzeit und im Jahr "+diamant+" Diamanten Hochzeit feiern.");
j4.setText(resultat);
-
}
});
- j4 = new JTextField("Hier erfahren Sie Ergebnisse aus Ihrer Auswahl"); Panele.add(j4);
-
+ j4 = new JTextField("Hier erfahren Sie Ergebnisse aus Ihrer Auswahl",8 0); Panele.add(j4);
fr.setVisible(true);
- fr.setAlwaysOnTop(true);
fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
-
}
//Methode gibt eine ganze Zahl (int) zurück
diff --git a/src/Tage_DTest.java b/src/Tage_DTest.java
index 7957c99..43c446f 100644
--- a/src/Tage_DTest.java
+++ b/src/Tage_DTest.java
@@ -1,18 +1,20 @@
-import static org.junit.jupiter.api.Assertions.*;
-
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
-class Tage_DTest {
+import static org.junit.jupiter.api.Assertions.*;
- @Test
- void main() {
+class Tage_DTest {
- try{
- Tage_D window = new Tage_D();
- }catch(Exception e){
- System.out.println(e.toString());
+ @BeforeEach
+ void setUp() {
}
+ @AfterEach
+ void tearDown() {
+ }
- }
-}
+ @Test
+ void gibZufall() {
+ }
+}
\ No newline at end of file