question: public final JMenuItem addCheckboxItem ( JMenu menu , String key , String label ) { JCheckBoxMenuItem item = new JCheckBoxMenuItem ( label ) ; menuItems . put ( key , item ) ; item . setActionCommand ( key ) ; menu . add ( item ) ; item . addItemListener ( itemListener ) ; return item ; }
target:  Adds a CheckboxMenuItem to a menu.