List of usage examples for javax.swing SwingUtilities updateComponentTreeUI
public static void updateComponentTreeUI(Component c)
updateUI()
-- that is, to initialize its UI property with the current look and feel. From source file:utybo.branchingstorytree.swing.OpenBSTGUI.java
private void switchLaF(int id, LookAndFeel laf) { try {// w w w. j av a 2 s. c o m dark = id == 0 || ADDITIONAL_DARK_THEMES.containsValue(laf); UIManager.setLookAndFeel(laf); SwingUtilities.updateComponentTreeUI(instance); background.setDark(dark); darkModeCallbacks.forEach(a -> a.accept(dark)); selectedTheme = id; } catch (UnsupportedLookAndFeelException e) { LOG.warn("Unsupported LaF", e); } }