repaint();
  public void remove(int index)  {    synchronized (getTreeLock ())      {        Component r = component[index];        ComponentListener[] list = r.getComponentListeners();        for (int j = 0; j < list.length; j++)              r.removeComponentListener(list[j]);                if (r.isShowing())        r.removeNotify();        System.arraycopy(component, index + 1, component, index,                         ncomponents - index - 1);        component[--ncomponents] = null;        invalidate();        if (layoutMgr != null)          layoutMgr.removeLayoutComponent(r);        r.parent = null;        if (isShowing ())          {            // Post event to notify of removing the component.        ContainerEvent ce = new ContainerEvent(this,                                               ContainerEvent.COMPONENT_REMOVED,                                               r);        getToolkit().getSystemEventQueue().postEvent(ce);            // Repaint this container.            repaint();      }  }  }