public static Set<Window> updateUI(){
  Set<Window> updated=new HashSet<Window>();
  for (  Container c : s_windows) {
    Window w=getFrame(c);
    if (w == null)     continue;
    if (updated.contains(w))     continue;
    SwingUtilities.updateComponentTreeUI(w);
    w.validate();
    RepaintManager mgr=RepaintManager.currentManager(w);
    Component childs[]=w.getComponents();
    for (    Component child : childs) {
      if (child instanceof JComponent)       mgr.markCompletelyDirty((JComponent)child);
    }
    w.repaint();
    updated.add(w);
  }
  for (  Window w : s_hiddenWindows) {
    if (updated.contains(w))     continue;
    SwingUtilities.updateComponentTreeUI(w);
    w.validate();
    RepaintManager mgr=RepaintManager.currentManager(w);
    Component childs[]=w.getComponents();
    for (    Component child : childs) {
      if (child instanceof JComponent)       mgr.markCompletelyDirty((JComponent)child);
    }
    w.repaint();
    updated.add(w);
  }
  return updated;
}

public static Set < Window > updateUI ( ) { Set < Window > updated = new HashSet < Window > ( ) ; for ( Container c : s_windows ) { Window w = getFrame ( c ) ; if ( w == null ) continue ; if ( updated . contains ( w ) ) continue ; SwingUtilities . updateComponentTreeUI ( w ) ; w . validate ( ) ; RepaintManager mgr = RepaintManager . currentManager ( w ) ; Component childs [ ] = w . getComponents ( ) ; for ( Component child : childs ) { if ( child instanceof JComponent ) mgr . markCompletelyDirty ( ( JComponent ) child ) ; } w . repaint ( ) ; updated . add ( w ) ; } for ( Window w : s_hiddenWindows ) { if ( updated . contains ( w ) ) continue ; SwingUtilities . updateComponentTreeUI ( w ) ; w . validate ( ) ; RepaintManager mgr = RepaintManager . currentManager ( w ) ; Component childs [ ] = w . getComponents ( ) ; for ( Component child : childs ) { if ( child instanceof JComponent ) mgr . markCompletelyDirty ( ( JComponent ) child ) ; } w . repaint ( ) ; updated . add ( w ) ; } return updated ; }
update all windows after look and feel changes .
