Question

I have a Jcheckbox but it only has the tick to show its checked, is there a way i can change it to a cross, or circle? and is there a way to change the grey background to white the setBackground doesn't seem to make a difference?

Was it helpful?

Solution

User setPressedIcon, setIcon and setDisabledIcon

    JCheckBox b = new JCheckBox();
    b.setPressedIcon(pressedIcon)
    b.setIcon(defaultIcon);
    b.setDisabledIcon(disabledIcon)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top