So I have a JTable with check-boxes. I would like to have the check-boxes contain one image when they are \"checked\" and another image when they are \"unchecked\" (i.e., displa
You would have to use the
isSelected
Method to see if the box is checked or not and by that you can use a if statement and if it is checked you use
checkBox.setIcon(myIcon);
Note that u can also u an ItemListener for the task of knowing if the box is selected or not.
Question answeared using following resources: http://www.roseindia.net/java/example/java/swing/CustomizedCheckBox.shtml
How to check that a JCheckBox is checked?