// 初始化
JCheckBox chk=new JCheckBox("XXX");

// 选择
chk.setSelected(true);

// 判断选择状态
chk.isSelected()

 JCheckBox使用示例_初始化