List of utility methods to do Swing Look and Feel
void | setLookAndFeel() Setup look at feel. if (THREAD_REPAINT_DEBUG) { try { Class<?> cls = ClassLoader.getSystemClassLoader() .loadClass("org.jdesktop.swinghelper.debug.CheckThreadViolationRepaintManager"); RepaintManager.setCurrentManager((RepaintManager) cls.newInstance()); } catch (Exception e) { if (PREFER_GTK) { try { Toolkit toolkit = Toolkit.getDefaultToolkit(); Class<?> suntoolkit = Class.forName("sun.awt.SunToolkit"); Method testm = suntoolkit.getMethod("isNativeGTKAvailable"); if (suntoolkit.isInstance(toolkit) && (Boolean) testm.invoke(toolkit)) { UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel"); return; } catch (Exception e) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { |
void | setLookAndFeel() Sets the LAF for the application dynamically looking for JGoodies Looks library. if (System.getProperty("java.vendor").startsWith("Apple")) { if (Boolean.getBoolean("marathon.useAppleMenuBar") || System.getProperty("marathon.useAppleMenuBar") == null) System.setProperty("apple.laf.useScreenMenuBar", "true"); return; try { Class<?> classOptions = Class.forName("com.jgoodies.looks.Options"); ... |
void | setLookAndFeel() set Look And Feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e1) { e1.printStackTrace(); |
void | setLookAndFeel() The standard look and feel for the system is used. try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { System.err.println("Couldn't use the system look."); |
void | setLookandFeel() set Lookand Feel try { SetLookAndFeel("Metal", "Ocean"); } catch (Exception e) { e.printStackTrace(); |
void | setLookAndFeel() Set UI look & feel to system look & feel. UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); |
void | setLookAndFeel() set Look And Feel if (UIManager.getLookAndFeel().getID().equals("Aqua")) { SPINNERHEIGHT = 20; } else { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); } catch (Exception e) { try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); ... |
void | setLookAndFeel() set Look And Feel String lafStr = System.getProperty("anidev.pcds.laf", "<nimbus>"); switch (lafStr) { case "<nimbus>": lafStr = "com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"; break; case "<system>": lafStr = UIManager.getSystemLookAndFeelClassName(); break; ... |
void | setLookAndFeel() Try to set the default look and feel. try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (Exception e) { |
void | setLookAndFeel(Component comp) set Look And Feel if (isInEclipse()) {
LookAndFeel oldLaF = UIManager.getLookAndFeel();
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
SwingUtilities.updateComponentTreeUI(comp);
UIManager.setLookAndFeel(oldLaF);
|