question: public void removeAction ( String category , Action action ) { JMenu categoryMenu = categories . get ( getCaption ( category ) ) ; if ( categoryMenu == null ) { return ; } for ( int i = 0 ; i < categoryMenu . getItemCount ( ) ; i ++ ) { JMenuItem item = categoryMenu . getItem ( i ) ; if ( item . getAction ( ) == action ) { categoryMenu . remove ( i ) ; return ; } } }
target:  Removes an action from a category.