diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 477d1f6..878308c 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -2,10 +2,14 @@ - - + - + + + + + + - @@ -85,6 +98,11 @@ + + + + + @@ -102,12 +120,23 @@ - - - + + + + + + + + + + + + + + - - - - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - + + - + - - + + @@ -323,7 +368,7 @@ - + - - + + + + + @@ -355,70 +399,65 @@ - - - - - - - - + - - + + - - - - - - - - - - - - - - - + + - - - - + - - - - + - + - + - - + + + + + + + + + - + + + + + + - + + + + + + + + - - + + + + @@ -473,10 +512,12 @@ + JunitTest diff --git a/JunitTest/JunitTest.iml b/JunitTest/JunitTest.iml new file mode 100644 index 0000000..b0d77c4 --- /dev/null +++ b/JunitTest/JunitTest.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/D_Test2.java b/src/D_Test2.java deleted file mode 100644 index 79f8925..0000000 --- a/src/D_Test2.java +++ /dev/null @@ -1,2 +0,0 @@ -public class D_Test2 { -} diff --git a/src/D_Test3.java b/src/D_Test3.java deleted file mode 100644 index 7264963..0000000 --- a/src/D_Test3.java +++ /dev/null @@ -1,2 +0,0 @@ -public class D_Test3 { -} diff --git a/src/Main.java b/src/Main.java index 1f05c4b..85efd13 100644 --- a/src/Main.java +++ b/src/Main.java @@ -1,6 +1,6 @@ import javax.swing.*; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +import java.awt.*; +import java.awt.event.*; public class Main { //Variablen GUI @@ -11,90 +11,105 @@ public class Main { JPanel contantPane = null; JLabel label = null; JMenuItem jmI = null; + JComboBox combobox_1; //Konstruktor Gui public Main(){ - this.fr = new JFrame("Coutinius Integration"); - this.fr.setSize(666,900); - - this.jmb = new JMenuBar(); - this.fr.setJMenuBar(jmb); - this.jm = new JMenu("Menu"); - this.jmb.add(jm); - this.jmI = new JMenuItem("Exit"); - this.jm.add(jmI); - this.jmI.addActionListener(new ActionListener1()); - this.jm1 = new JMenu("Info"); - this.jmb.add(jm1); + fr = new JFrame("Coutinius Integration SS 2019"); + fr.setSize(600,900); + fr.setFont(new Font("Helvetica", Font.PLAIN, 12)); + + 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) { - this.contantPane = new JPanel(); + System.exit(-1); + } + }); + jm1 = new JMenu("Info"); + jmb.add(jm1); - this.fr.setContentPane(contantPane); + contantPane = new JPanel(); + fr.setContentPane(contantPane); - this.contantPane.add(new JLabel("Ein Tool der CI!")); + contantPane.add(new JLabel("Ein Tool der CI!")); - this.contantPane.add(new JLabel("1) Tools von Daniel")); + contantPane.add(new JLabel("Tools von Daniel, Eugen, Michael")); ButtonGroup buttonGroup = new ButtonGroup(); - JRadioButton hzeit = new JRadioButton("Hochzeit"); - hzeit.setBounds(100, 170, 100, 20); - buttonGroup.add(hzeit); - this.contantPane.add(hzeit); - JRadioButton gtag = new JRadioButton("Geburtstag"); - gtag.setBounds(250, 170, 100, 20); - buttonGroup.add(gtag); - this.contantPane.add(gtag); + + fr.addWindowListener(new WindowAdapter() { + public void windowClosing(WindowEvent e) { + System.exit(0); + } + }); + + combobox_1 = new JComboBox(); + combobox_1.addItem("Daniels Tools"); + combobox_1.addItem("Eugen Tools"); + combobox_1.addItem("Michaels Tools"); + fr.add(combobox_1); + + + 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); JLabel auswahl = new JLabel("Ihre Auswahl:"); auswahl.setBounds(10, 200, 100, 20); - this.contantPane.add(auswahl); - final JTextField text1 = new JTextField(); + contantPane.add(auswahl); + final JTextField text1 = new JTextField("..Bisher keine Auswahl!.."); text1.setBounds(100, 200, 300, 20); - this.contantPane.add(text1); + contantPane.add(text1); - hzeit.addActionListener(new ActionListener() { + DTools.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent ie) { - text1.setText("MALE"); - } - }); + text1.setText("Daniel Tools"); - gtag.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent ie) { - text1.setText("FEMALE"); } }); + ETools.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ie) { + text1.setText("Eugens Tools"); + } + }); - this.contantPane.add(new JLabel("2) Tools von Eugen")); - + MTools.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent ie) { + text1.setText("Michaels Tools"); + } + }); + contantPane.setVisible(true); + fr.setVisible(true); + fr.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + } + public static void main(String[] args) { + Main mn = new Main(); + } - this.contantPane.add(new JLabel("3) Tools von Michael")); +} - this.contantPane.setVisible(true); - this.fr.setVisible(true); - } - public static void main(String[] args) { - System.out.println("Hello World!"); - Main mn = new Main(); - } - // Action Listener - private class ActionListener1 implements ActionListener{ - @Override - public void actionPerformed(ActionEvent e) { - System.exit(0); - } - } -} \ No newline at end of file diff --git a/src/MainGUI.form b/src/MainGUI.form deleted file mode 100644 index 0ad90ba..0000000 --- a/src/MainGUI.form +++ /dev/null @@ -1,28 +0,0 @@ - -
- - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/src/MainGUI.java b/src/MainGUI.java deleted file mode 100644 index 8955521..0000000 --- a/src/MainGUI.java +++ /dev/null @@ -1,5 +0,0 @@ -import javax.swing.*; - -public class MainGUI { - private JPanel panel1; -} diff --git a/src/Tage_D.java b/src/Tage_D.java index 9c8d482..92fdee5 100644 --- a/src/Tage_D.java +++ b/src/Tage_D.java @@ -98,37 +98,9 @@ public class Tage_D extends JFrame { this.fr.setVisible(true); this.fr.setAlwaysOnTop(true); - DerHandler handler = new DerHandler(); - menuItem1.addActionListener(handler); - gtag.addActionListener(handler); - hzeit.addActionListener(handler); } -// Action Listener - private class DerHandler implements ActionListener { - @Override - public void actionPerformed(ActionEvent event) { - - String string = ""; -/* - if(event.getSource()=hzeit) - string=String.format("Name: %s", event.getActionCommand()); - - else if(event.getSource()==gtag) - string=String.format("passwortFeld2: %s", event.getActionCommand()); - - JOptionPane.showMessageDialog(null, string); - } - - - - - } - - */ - } -} public static void main(String[] args) { Tage_D gb = new Tage_D();