Originally posted by Rob Prime:
setIcon(Icon) should also work.
Actually it doesn't, inasmuch as the icon will replace the default icon, which is the square with the check.
This is a partially implemented UI delegate which paints a custom icon in addition to the default one, in the text area of the JCheckBox.
A fuller implementation would also need to override setPreferredSize and get/set Size, Maximum/Minimum Size .. (maybe get/setBounds, too.. haven't really thought about it).