Newer
Older
jrex / src / main / java / JRex.java

import java.awt.Color;
import javax.swing.UIManager;
import javax.swing.plaf.nimbus.NimbusLookAndFeel;
import jrex.ui.MainFrame;

/*
 */
/**
 * Main class.
 *
 * @author Mark George <mark.george@otago.ac.nz>
 */
public class JRex {

	public static void main(String args[]) throws Exception {
//		UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel");
		UIManager.setLookAndFeel(new 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);
			}
		});
	}
}