Change size of ImageIcon in a JRadioButton

Posted by Frederik Wordenskjold on Stack Overflow See other posts from Stack Overflow or by Frederik Wordenskjold
Published on 2010-04-05T22:10:06Z Indexed on 2010/04/05 22:13 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

I simply want to change the size (diameter) of the actual (default) ImageIcon of my JRadioButton. I've changed the size of the font displayed in the widget, so it really looks silly with such a large radiobutton.

JRadioButton button = new JRadioButton("Button");
button.setFont(new Font("Lucida Grande",Font.PLAIN, 11));

gives me this giant button:

GIANT button!!

Do I really have to create my own ImageIcon? Or can I somehow scale the default one, without too much of a hassle?

© Stack Overflow or respective owner

Related posts about java

Related posts about swing