Main.java 1.0 KB

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