123456789101112131415161718192021222324252627282930313233 |
- package ui.view.main;
- import java.awt.EventQueue;
- import javax.swing.JPanel;
- import javax.swing.UIManager;
- import javax.swing.UnsupportedLookAndFeelException;
- /**
- * The Main class defines the program entry point.
- * @author Tom
- *
- */
- public class Main extends JPanel{
- public static void main(String[] args) {
- loadNotLinuxLookAndFeel();
- EventQueue.invokeLater(() -> openMainFrame());
- }
-
- public static void openMainFrame() {
- MainFrame mainFrame = new MainFrame();
- }
- private static void loadNotLinuxLookAndFeel() {
- try {
- if (!System.getProperty("os.name").startsWith("Linux")) {
- UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
- }
- } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) {
- e.printStackTrace();
- }
- }
- }
|