Main.java 868 B

12345678910111213141516171819202122232425262728293031
  1. package gui.main;
  2. import gui.frames.MainFrame;
  3. import javax.swing.UIManager;
  4. import javax.swing.UnsupportedLookAndFeelException;
  5. import java.awt.*;
  6. import java.lang.reflect.InvocationTargetException;
  7. import java.lang.reflect.Method;
  8. public class Main {
  9. public static void main(String[] args){
  10. //sets the systems look and feels
  11. //osx
  12. if(System.getProperties().getProperty("os.name").equals("Mac OS X")) {
  13. System.setProperty("apple.laf.useScreenMenuBar", "true");
  14. System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Test");
  15. }
  16. try{
  17. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  18. }catch(ClassNotFoundException | InstantiationException| IllegalAccessException | UnsupportedLookAndFeelException e) {
  19. e.printStackTrace();
  20. }
  21. new MainFrame();
  22. }
  23. }