A check box allows the user to enter boolean or "yes"-"no" data.
JCheckBox checkBox = new JCheckBox("Check Box Label");
Describe model and model access methods.
setSelected(true)
message
is sent to it,
setSelected(false)
is
sent to it.
If your code is not sending setSelected() messages to a check box then you can handle its responses with either an action listener or an item listener.
checkBox.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { code to implement response to user click. } });
checkBox.addItemListener(new ItemListener() { public void itemStateChanged(ItemEvent e) { code to implement response to state change. } });