List of utility methods to do Swing Look and Feel
void | setJavaLookAndFeel() set Java Look And Feel try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { System.out.println("Error setting Java LAF: " + e); |
void | setJavaLookAndFeel() set Java Look And Feel try { UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName()); } catch (Exception e) { |
void | setLaf() set Laf try { UIManager.setLookAndFeel(NimbusLookAndFeel.class.getName()); UIManager.put("Table.rowHeight", Integer.valueOf(25)); NimbusLookAndFeel laf = (NimbusLookAndFeel) UIManager.getLookAndFeel(); laf.getDefaults().put("defaultFont", new Font(Font.SANS_SERIF, Font.PLAIN, 16)); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { e.printStackTrace(); ... |
boolean | setLAF(final String lafName) Tries to set the specified Look and Feel. for (final LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) if (lookAndFeelInfo.getName().equals(lafName)) try { UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); return true; } catch (final Exception e) { System.err.println("Failed to set " + lookAndFeelInfo.getName() + " look and feel!"); e.printStackTrace(System.err); ... |
void | setLAF(String className) Attempts to set the look and feel the specified class. try { UIManager.setLookAndFeel(className); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) { |
void | setLAF(String LAFName) set LAF for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if (LAFName.equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; |
void | setLaf(String lafName) Should be called before initComponents() for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if (info.getName().equals(lafName)) { try { UIManager.setLookAndFeel(info.getClassName()); } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e) { break; ... |
void | setLAFNimbus() set LAF Nimbus setLAF("Nimbus");
|
void | setLookAndFeel() set Look And Feel try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } catch (Exception e) { ... |
void | setLookAndFeel() set Look And Feel try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (InstantiationException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); ... |