1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- package ui.view;
- import java.awt.EventQueue;
- import javax.swing.UIManager;
- import javax.swing.UnsupportedLookAndFeelException;
- import ui.controller.*;
- import ui.model.*;
- /**
- * The main Class in this Program. The GUI is created in this Class.
- *
- * @author Gruppe14
- *
- */
- public class Main {
- /**
- * main method of this program.
- *
- * @param args
- * standard
- */
- public static void main(String[] args) {
- if (!System.getProperty("os.name").startsWith("Linux"))
- // *Design
- try {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- else
- try {
- UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
- } catch (ClassNotFoundException | InstantiationException | IllegalAccessException
- | UnsupportedLookAndFeelException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
- Model model = new Model();
- Control control = new Control(model);
- GUI view = new GUI(control);
- view.getFrmCyberPhysical().setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
- }
- }
|