Java Code Examples for javax.swing.UnsupportedLookAndFeelException#printStackTrace()

The following examples show how to use javax.swing.UnsupportedLookAndFeelException#printStackTrace() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Settings.java    From sheepit-client with GNU General Public License v2.0 7 votes vote down vote up
private void applyTheme(String theme_) {
	try {
		if (theme_.equals("light")) {
			UIManager.setLookAndFeel(new FlatLightLaf());
		}
		else if (theme_.equals("dark")) {
			UIManager.setLookAndFeel(new FlatDarkLaf());
		}
		
		// Apply the new theme
		FlatLaf.updateUI();
	}
	catch (UnsupportedLookAndFeelException e1) {
		e1.printStackTrace();
	}
}
 
Example 2
Source File: WizardDemo.java    From nextreports-designer with Apache License 2.0 6 votes vote down vote up
public static void main(String args[]) {
    	// set look and feel
    	PlasticLookAndFeel laf = new Plastic3DLookAndFeel();
    	PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
    	try {
			UIManager.setLookAndFeel(laf);
		} catch (UnsupportedLookAndFeelException e) {
			e.printStackTrace();
		}

        JFrame frame = new JFrame("Wizard Demo");
        frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        Wizard wizard = new Wizard(new WelcomeWizardPanel());
        wizard.addWizardListener(new WizardDemo());
        frame.setContentPane(wizard);
//        frame.pack();
        frame.setSize(450, 400);
        frame.setLocationRelativeTo(null);
        frame.setVisible(true);
    }
 
Example 3
Source File: Main.java    From btdex with GNU General Public License v3.0 5 votes vote down vote up
private void setUIManager() {
	// TODO try again later this other theme, now bugs with tooltip, long text buttons, etc.
	// LafManager.install(new DarculaTheme()); //Specify the used theme.
	// LafManager.getUserProperties().put(DarkTooltipUI.KEY_STYLE, DarkTooltipUI.VARIANT_PLAIN);
	try {
		DarculaLaf laf = new DarculaLaf();
		UIManager.setLookAndFeel(laf);
	} catch (UnsupportedLookAndFeelException e) {
		e.printStackTrace();
	}
}
 
Example 4
Source File: ParameterInjectionDialogExample.java    From rapidminer-studio with GNU Affero General Public License v3.0 5 votes vote down vote up
public static void main(String[] args) {
	ParameterService.init();
	EncryptionProvider.initialize();
	ParameterService.setParameterValue(RapidMinerGUI.PROPERTY_FONT_CONFIG, "Standard fonts");
	try {
		UIManager.setLookAndFeel(new RapidLookAndFeel());
	} catch (UnsupportedLookAndFeelException e) {
		e.printStackTrace();
	}
	JDialog dialog = new ParameterInjectionDialogExample();
	dialog.setVisible(true);
}
 
Example 5
Source File: SeaGlassRootPaneUITest.java    From seaglass with Apache License 2.0 5 votes vote down vote up
/**
 * DOCUMENT ME!
 *
 * @throws Exception java.lang.Exception
 */
@BeforeClass
public static void setUpBeforeClass() throws Exception {
    try {
        UIManager.setLookAndFeel(new SeaGlassLookAndFeel());
    } catch (UnsupportedLookAndFeelException e) {
        e.printStackTrace();
    }
}
 
Example 6
Source File: NewLookAndFeel.java    From shakey with Apache License 2.0 5 votes vote down vote up
public static void register() {
	try {
		UIManager.setLookAndFeel( new NewLookAndFeel() );
	} catch (UnsupportedLookAndFeelException e) {
		e.printStackTrace();
	}
}
 
Example 7
Source File: SqlEditorTester.java    From nextreports-designer with Apache License 2.0 5 votes vote down vote up
public SqlEditorTester() {
   	// set look and feel
   	PlasticLookAndFeel lookAndFeel = new PlasticXPLookAndFeel();
   	PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
   	try {
		UIManager.setLookAndFeel(lookAndFeel);
	} catch (UnsupportedLookAndFeelException e) {
		e.printStackTrace();
	}

	initComponents();
}
 
Example 8
Source File: NextReports.java    From nextreports-designer with Apache License 2.0 5 votes vote down vote up
private void setLookAndFeel() {
    try {
        PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
        UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
    } catch (UnsupportedLookAndFeelException e) {
        e.printStackTrace();
        LOG.error(e.getMessage(), e);
    }
}