Adding an Icon to the Label of a JRadioButton Component
Unlike a JButton, setIcon() does not add an icon to the text
label. Rather, in a radio button, the method is used to customize the
icons used to depict its state. However, by using the HTML
capabilities in a label, it is possible to add an icon to the label
without affecting the state-depicting icons. This technique is
identical to the one used for checkboxes. For more information, see
Adding an Icon to the Label of a JCheckBox Component.
Post a comment