Main.java 940 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. public class Main {
  9. public static void main(String[] args) {
  10. // *Design
  11. try {
  12. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  13. } catch (ClassNotFoundException | InstantiationException | IllegalAccessException
  14. | UnsupportedLookAndFeelException e1) {
  15. // TODO Auto-generated catch block
  16. e1.printStackTrace();
  17. }
  18. EventQueue.invokeLater(new Runnable() {
  19. public void run() {
  20. try {
  21. IdCounter ID = new IdCounter();
  22. Model M = new Model();
  23. Control C = new Control(M, ID);
  24. GUI V = new GUI(C);
  25. V.updateCategories(M.getCategories());
  26. V.getFrmCyberPhysical().setVisible(true);
  27. } catch (Exception e) {
  28. e.printStackTrace();
  29. }
  30. }
  31. });
  32. }
  33. }