public static void updateUI(Window win){
  if (win == null)   return;
  Window c=win;
  do {
    SwingUtilities.updateComponentTreeUI(c);
    c.invalidate();
    c.pack();
    c.validate();
    c.repaint();
    c=c.getOwner();
  }
 while (c != null);
}

public static void updateUI ( Window win ) { if ( win == null ) return ; Window c = win ; do { SwingUtilities . updateComponentTreeUI ( c ) ; c . invalidate ( ) ; c . pack ( ) ; c . validate ( ) ; c . repaint ( ) ; c = c . getOwner ( ) ; } while ( c != null ) ; }
update ui of this and parent windows
