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 unselDisIcon = new ImageIcon("nosel-dis-icon.gif");
checkbox.setDisabledIcon(unselDisIcon);
// Set the selected state icon
Icon selDisIcon = new ImageIcon("sel-dis-icon.gif");
checkbox.setDisabledSelectedIcon(selDisIcon);
}
}