import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JCheckBox;
publicclass Main {
publicstaticvoid main(String[] argv) throws Exception {
JCheckBox checkbox = new JCheckBox();
// Set the unselected state icon
Icon unselIcon = new ImageIcon("nosel-icon.gif");
checkbox.setIcon(unselIcon);
// Set the selected state icon
Icon selIcon = new ImageIcon("sel-icon.gif");
checkbox.setSelectedIcon(selIcon);
}
}