private JCheckBox addCheckbox(String text,Container container){
  JCheckBox checkbox=new JCheckBox(text);
  checkbox.setAlignmentX(Component.LEFT_ALIGNMENT);
  checkbox.setBorder(BorderFactory.createEmptyBorder(0,0,10,5));
  container.add(checkbox);
  return checkbox;
}

private JCheckBox addCheckbox ( String text , Container container ) { JCheckBox checkbox = new JCheckBox ( text ) ; checkbox . setAlignmentX ( Component . LEFT_ALIGNMENT ) ; checkbox . setBorder ( BorderFactory . createEmptyBorder ( 0 , 0 , 10 , 5 ) ) ; container . add ( checkbox ) ; return checkbox ; }
adds a preconfigured jcheckbox to the specified container , setting its alignment constraint to left and adding an empty padding border .
