/** Updates the UI of the passed in window and all its children. */
 private static void updateWindowUI(Window window) {
   SwingUtilities.updateComponentTreeUI(window);
   Window ownedWins[] = window.getOwnedWindows();
   for (int i = 0; i < ownedWins.length; i++) {
     updateWindowUI(ownedWins[i]);
   }
 }