Search code examples
javaswingjradiobutton

How to make JRadioButton transparent


I want to make the white circles of JRadioButtons transparent. How can I do that? setOpaque(false) only removes the background from text and not the circle.


Solution

  • Create custom Icons that use transparency for the radio button. See methods like:

    setIcon(...);
    setSelectedIcon(...);