for (int i = 0; i < ncomponents; ++i) { if (component[i] == comp) { remove(i); break; } }
Component r = component[index];  r.removeNotify();  System.arraycopy(component, index + 1, component, index, ncomponents - index - 1); component[--ncomponents] = null;  invalidate();  if (layoutMgr != null) layoutMgr.removeLayoutComponent(r);   ContainerEvent ce = new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, r); getToolkit().getSystemEventQueue().postEvent(ce);
  public void remove(Component comp)  {    for (int i = 0; i < ncomponents; ++i)      {        if (component[i] == comp)          {            remove(i);            break;          }      }  }