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;
}

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 ; }
creates and adds a new checkbox to this panel
