-1

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?

skaffman
  • 398,947
  • 96
  • 818
  • 769
f1wade
  • 2,877
  • 6
  • 27
  • 43
  • is it possible to do with standard stuff as i dont want to add custom classes if i can help it. – f1wade Dec 08 '10 at 08:12

1 Answers1

3

User setPressedIcon, setIcon and setDisabledIcon

    JCheckBox b = new JCheckBox();
    b.setPressedIcon(pressedIcon)
    b.setIcon(defaultIcon);
    b.setDisabledIcon(disabledIcon)
AlexR
  • 114,158
  • 16
  • 130
  • 208
  • great but what is the pressedIcon, is it an icon i define myself or a standard one i can get from somewhere? – f1wade Dec 08 '10 at 08:12