Main.java 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. // TODO Auto-generated catch block
  27. e.printStackTrace();
  28. }
  29. EventQueue.invokeLater(new Runnable() {
  30. public void run() {
  31. try {
  32. Model model = new Model();
  33. Control control = new Control(model);
  34. GUI view = new GUI(control);
  35. view.getFrmCyberPhysical().setVisible(true);
  36. } catch (Exception e) {
  37. e.printStackTrace();
  38. }
  39. }
  40. });
  41. }
  42. }