public void remove(int index){
synchronized (getTreeLock()) {
    MenuItem mi=getItem(index);
    items.removeElementAt(index);
    MenuPeer peer=(MenuPeer)this.peer;
    if (peer != null) {
      mi.removeNotify();
      mi.parent=null;
      peer.delItem(index);
    }
  }
}

public void remove ( int index ) { synchronized ( getTreeLock ( ) ) { MenuItem mi = getItem ( index ) ; items . removeElementAt ( index ) ; MenuPeer peer = ( MenuPeer ) this . peer ; if ( peer != null ) { mi . removeNotify ( ) ; mi . parent = null ; peer . delItem ( index ) ; } } }
removes the menu item at the specified index from this menu .
