question: 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 ; }
target:  Create a panel containing a checkbox.