diff --git a/src/JRex.java b/src/JRex.java new file mode 100644 index 0000000..20fad27 --- /dev/null +++ b/src/JRex.java @@ -0,0 +1,35 @@ + +import java.awt.Color; +import javax.swing.UIManager; +import jrex.ui.MainFrame; + +/* + */ +/** + * Main class. + * + * @author Mark George + */ +public class JRex { + + public static void main(String args[]) throws Exception { + UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); + + // set dark theme if arg exists + if (args.length > 0 && "dark".equalsIgnoreCase(args[0])) { + UIManager.put("control", new Color(50, 50, 50)); + UIManager.put("nimbusBase", new Color(60, 60, 60)); + UIManager.put("nimbusBlueGrey", new Color(60, 60, 60)); + UIManager.put("nimbusFocus", new Color(90, 90, 90)); + UIManager.put("nimbusLightBackground", new Color(70, 70, 70)); + UIManager.put("text", new Color(230, 230, 230)); + } + + java.awt.EventQueue.invokeLater(new Runnable() { + @Override + public void run() { + new MainFrame().setVisible(true); + } + }); + } +}