Main.java 995 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package ui.view;
  2. import java.awt.EventQueue;
  3. import javax.swing.UIManager;
  4. import javax.swing.UnsupportedLookAndFeelException;
  5. import ui.controller.*;
  6. import ui.model.*;
  7. /**
  8. * The main Class in this Program. The GUI is created in this Class.
  9. *
  10. * @author Gruppe14
  11. *
  12. */
  13. public class Main {
  14. /**
  15. * main method of this program.
  16. *
  17. * @param args
  18. * standard
  19. */
  20. public static void main(String[] args) {
  21. // *Design
  22. try {
  23. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  24. } catch (ClassNotFoundException | InstantiationException | IllegalAccessException
  25. | UnsupportedLookAndFeelException e) {
  26. e.printStackTrace();
  27. }
  28. EventQueue.invokeLater(new Runnable() {
  29. public void run() {
  30. try {
  31. Model model = new Model();
  32. Control control = new Control(model);
  33. GUI view = new GUI(control);
  34. view.getFrmCyberPhysical().setVisible(true);
  35. } catch (Exception e) {
  36. e.printStackTrace();
  37. }
  38. }
  39. });
  40. }
  41. }