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.

49 lines
1.2 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
  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. JPanel contantPane = null;
  10. JLabel label = null;
  11. JMenuItem jmI = null;
  12. //Konstruktor Gui
  13. public Main(){
  14. this.fr = new JFrame("Coutinius Integration");
  15. this.fr.setSize(666,900);
  16. this.jmb = new JMenuBar();
  17. this.fr.setJMenuBar(jmb);
  18. this.jm = new JMenu("File");
  19. this.jmb.add(jm);
  20. this.jmI = new JMenuItem("Exit");
  21. this.jm.add(jmI);
  22. this.jmI.addActionListener(new ActionListener1());
  23. this.contantPane = new JPanel();
  24. this.fr.setContentPane(contantPane);
  25. this.contantPane.add(new JLabel("Beispiel JLabel"));
  26. this.contantPane.setVisible(true);
  27. this.fr.setVisible(true);
  28. }
  29. public static void main(String[] args) {
  30. System.out.println("Hello World!");
  31. Main mn = new Main();
  32. }
  33. private class ActionListener1 implements ActionListener{
  34. @Override
  35. public void actionPerformed(ActionEvent e) {
  36. System.exit(0);
  37. }
  38. }
  39. }