public void remove(MenuComponent m){
synchronized (getTreeLock()) {
    int index=menus.indexOf(m);
    if (index >= 0) {
      remove(index);
    }
  }
}

public void remove ( MenuComponent m ) { synchronized ( getTreeLock ( ) ) { int index = menus . indexOf ( m ) ; if ( index >= 0 ) { remove ( index ) ; } } }
removes the specified menu component from this menu bar .
