public void remove(final int index){
synchronized (getTreeLock()) {
    Menu m=getMenu(index);
    menus.removeElementAt(index);
    MenuBarPeer peer=(MenuBarPeer)this.peer;
    if (peer != null) {
      m.removeNotify();
      m.parent=null;
      peer.delMenu(index);
    }
    if (helpMenu == m) {
      helpMenu=null;
      m.isHelpMenu=false;
    }
  }
}

public void remove ( final int index ) { synchronized ( getTreeLock ( ) ) { Menu m = getMenu ( index ) ; menus . removeElementAt ( index ) ; MenuBarPeer peer = ( MenuBarPeer ) this . peer ; if ( peer != null ) { m . removeNotify ( ) ; m . parent = null ; peer . delMenu ( index ) ; } if ( helpMenu == m ) { helpMenu = null ; m . isHelpMenu = false ; } } }
removes the menu located at the specified index from this menu bar .
