synchronized (ownedWindows)
synchronized (getTreeLock ())
  public void hide()  {    // Hide visible owned windows.    synchronized (ownedWindows)      {	Iterator e = ownedWindows.iterator();	while(e.hasNext())	  {	    Window w = (Window)(((Reference) e.next()).get());	    if (w != null)	      {		if (w.isVisible() && w.getPeer() != null)		  w.getPeer().setVisible(false);	      }     	    else	      e.remove();	  }      }    super.hide();  }