List of utility methods to do Swing Look and Feel
boolean | supportsDarkLookAndFeel() supports Dark Look And Feel if (isDarkLookAndFeel()) return true; for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) { if (lookAndFeelInfo.getName().contains(DARK_LAF_NAME)) return true; return false; |
boolean | trySetNimbusLookAndFeel() try Set Nimbus Look And Feel try { for (final UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; return true; ... |
void | tryToSetSystemLookAndFeel() try To Set System Look And Feel try { setLookAndFeel(getSystemLookAndFeelClassName()); } catch (final Exception ignored) { |
void | tweakLookAndFeel() tweak Look And Feel if (!isMacOSX()) return; UIManager.put("Table.gridColor", Color.gray); |
void | useCrossPlatformLookAndFeel(Component object) use Cross Platform Look And Feel String laf; boolean useNative = false; if (useNative) { laf = UIManager.getSystemLookAndFeelClassName(); } else { laf = UIManager.getCrossPlatformLookAndFeelClassName(); try { ... |
boolean | usingAppleLAF() using Apple LAF return UIManager.getLookAndFeel().getClass().getName().startsWith("apple.laf"); |