CI 2019 von Daniel, Eugen und Michael
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
1.3 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. import javax.swing.*;
  2. import java.awt.event.ActionEvent;
  3. import java.awt.event.ActionListener;
  4. public class Main {
  5. //Variablen GUI
  6. JFrame fr = null;
  7. JMenuBar jmb = null;
  8. JMenu jm = null;
  9. JMenu jm1 = null;
  10. JPanel contantPane = null;
  11. JLabel label = null;
  12. JMenuItem jmI = null;
  13. //Konstruktor Gui
  14. public Main(){
  15. this.fr = new JFrame("Coutinius Integration");
  16. this.fr.setSize(666,900);
  17. this.jmb = new JMenuBar();
  18. this.fr.setJMenuBar(jmb);
  19. this.jm = new JMenu("Menu");
  20. this.jmb.add(jm);
  21. this.jmI = new JMenuItem("Exit");
  22. this.jm.add(jmI);
  23. this.jmI.addActionListener(new ActionListener1());
  24. this.jm1 = new JMenu("Info");
  25. this.jmb.add(jm1);
  26. this.contantPane = new JPanel();
  27. this.fr.setContentPane(contantPane);
  28. this.contantPane.add(new JLabel("Beispiel JLabel"));
  29. this.contantPane.setVisible(true);
  30. this.fr.setVisible(true);
  31. }
  32. public static void main(String[] args) {
  33. System.out.println("Hello World!");
  34. Main mn = new Main();
  35. }
  36. // Action Listener
  37. private class ActionListener1 implements ActionListener{
  38. @Override
  39. public void actionPerformed(ActionEvent e) {
  40. System.exit(0);
  41. }
  42. }
  43. }