question: private JCheckBox addCheckBox ( boolean selected , boolean endOfRow ) { JCheckBox box = new JCheckBox ( ) ; box . setSelected ( selected ) ; if ( endOfRow ) { c . gridwidth = GridBagConstraints . REMAINDER ; } else { c . gridwidth = 1 ; } layout . setConstraints ( box , c ) ; add ( box ) ; return box ; }
target:  Creates and adds a new checkbox to this panel