question: @ SuppressWarnings ( "unchecked" ) public void remove ( MenuComponent popup ) { synchronized ( getTreeLock ( ) ) { if ( popups == null ) { return ; } int index = popups . indexOf ( popup ) ; if ( index >= 0 ) { PopupMenu pmenu = ( PopupMenu ) popup ; if ( pmenu . peer != null ) { pmenu . removeNotify ( ) ; } pmenu . parent = null ; popups . removeElementAt ( index ) ; if ( popups . size ( ) == 0 ) { popups = null ; } } } }
target:  Removes the specified popup menu from the component.