SwingXUtilities { public static void updateAllComponentTreeUIs() { for (Window window: Window.getWindows()) { SwingUtilities.updateComponentTreeUI(window); } } private  SwingXUtilities(); static void updateMnemonicBinding(JComponent c, String pressed); static void updateMnemonicBinding(JComponent c, String pressed, String released); static void setComponentTreeEnabled(Component c, boolean enabled); static void setComponentTreeLocale(Component c, Locale locale); static void setComponentTreeBackground(Component c, Color color); static void setComponentTreeForeground(Component c, Color color); static void setComponentTreeFont(Component c, Font font); static void setHtmlFont(HTMLDocument doc, Font font); static void updateAllComponentTreeUIs(); static void updateAllComponentTreeUIs(Window window); static FutureTask<T> invokeLater(Callable<T> callable); static T invokeAndWait(Callable<T> callable); @SuppressWarnings("unchecked") static T getAncestor(Class<T> clazz, Component c); static boolean isDescendingFrom(Component focusOwner, Component parent); static boolean isUIInstallable(Object property); static void setLeadAnchorWithoutSelection(
            ListSelectionModel selectionModel, int lead, int anchor); static boolean shouldIgnore(MouseEvent mouseEvent,
            JComponent component); static int loc2IndexFileList(JList list, Point point); static void adjustFocus(JComponent component); static int convertModifiersToDropAction(int modifiers,
            int sourcActions);  }
@Test public void testUpdateAllComponentTreeUIs() { if (GraphicsEnvironment.isHeadless()) { LOG.fine("cannot run test - headless environment"); return; } if (isCrossPlatformLFSameAsSystem()) { LOG.info("cannot run test - no safe LFs to toggle"); return; } List<RootPaneContainer> toplevels = new ArrayList<RootPaneContainer>(); for (int i = 0; i < 10; i++) { JXFrame frame = new JXFrame(); toplevels.add(frame); toplevels.add(new JDialog(frame)); toplevels.add(new JWindow(frame)); } if (!UIManager.getLookAndFeel().isNativeLookAndFeel()) { LOG.warning("Assumption is to start with native LaF. Found " + UIManager.getLookAndFeel() + " instead."); } setSystemLF(false); SwingXUtilities.updateAllComponentTreeUIs(); for (RootPaneContainer window : toplevels) { JRootPane rootPane = window.getRootPane(); assertEquals(UIManager.get(rootPane.getUIClassID()), rootPane.getUI().getClass().getName()); } }