question: public static void removeAllSeparators ( JPopupMenu popupMenu ) { for ( int i = 0 ; i < popupMenu . getComponentCount ( ) ; i ++ ) { if ( isPopupMenuSeparator ( popupMenu . getComponent ( i ) ) ) { popupMenu . remove ( i ) ; i -- ; } } }
target:  Removes all separators from the given pop up menu.