currentParent.repaint(); }
  public void hide()  {    if (isVisible())      {        // Avoid NullPointerExceptions by creating a local reference.        ComponentPeer currentPeer=peer;        if (currentPeer != null)            currentPeer.setVisible(false);                this.visible = false;                // Invalidate the parent if we have one. The component itself must        // not be invalidated. We also avoid NullPointerException with        // a local reference here.        Container currentParent = parent;        if (currentParent != null)          {            currentParent.invalidate();            currentParent.repaint();          }        ComponentEvent ce =          new ComponentEvent(this,ComponentEvent.COMPONENT_HIDDEN);        getToolkit().getSystemEventQueue().postEvent(ce);      }	}