下面列出了javax.swing.UnsupportedLookAndFeelException#printStackTrace ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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();
}
}
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);
}
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();
}
}
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);
}
/**
* DOCUMENT ME!
*
* @throws Exception java.lang.Exception
*/
@BeforeClass
public static void setUpBeforeClass() throws Exception {
try {
UIManager.setLookAndFeel(new SeaGlassLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
}
public static void register() {
try {
UIManager.setLookAndFeel( new NewLookAndFeel() );
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
}
public SqlEditorTester() {
// set look and feel
PlasticLookAndFeel lookAndFeel = new PlasticXPLookAndFeel();
PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
try {
UIManager.setLookAndFeel(lookAndFeel);
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
}
initComponents();
}
private void setLookAndFeel() {
try {
PlasticLookAndFeel.setCurrentTheme(new ExperienceBlue());
UIManager.setLookAndFeel(new PlasticXPLookAndFeel());
} catch (UnsupportedLookAndFeelException e) {
e.printStackTrace();
LOG.error(e.getMessage(), e);
}
}