public static JPanel createCheckbox(String boxlabel,String[] buttons,boolean[] checked,ActionListener al){
  JPanel jp=createPaletteJPanel(boxlabel);
  for (int j=0; j < buttons.length; j++) {
    JCheckBox jcb=new JCheckBox(buttons[j]);
    jcb.setActionCommand(Integer.toString(j));
    if (al != null)     jcb.addActionListener(al);
    jcb.setSelected(checked[j]);
    jp.add(jcb);
  }
  return jp;
}

public static JPanel createCheckbox ( String boxlabel , String [ ] buttons , boolean [ ] checked , ActionListener al ) { JPanel jp = createPaletteJPanel ( boxlabel ) ; for ( int j = 0 ; j < buttons . length ; j ++ ) { JCheckBox jcb = new JCheckBox ( buttons [ j ] ) ; jcb . setActionCommand ( Integer . toString ( j ) ) ; if ( al != null ) jcb . addActionListener ( al ) ; jcb . setSelected ( checked [ j ] ) ; jp . add ( jcb ) ; } return jp ; }
create a panel containing a checkbox .
