SyntaxFix
Write A Post
Hire A Developer
Questions
Use the isSelected method.
You can also use an ItemListener so you'll be notified when it's checked or unchecked.