This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Resizing JRadioButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Resizing JRadioButton" Watch "Resizing JRadioButton" New topic

Resizing JRadioButton

Farhad Rahmati
Ranch Hand

Joined: Dec 16, 2010
Posts: 96
is it possible to resize JRadio Button?

I mean the circle, not the text. I want to resize the Radio button make it bigger for touch screen application. as it's size it very small

Rob Spoor

Joined: Oct 27, 2005
Posts: 19654

That's an icon, and you can set and get it from the radio button. Well, not "it" - "them". There's at least two of them; play around with the setIcon and setXXXIcon methods.

How To Ask Questions How To Answer Questions
Darryl Burke

Joined: May 03, 2008
Posts: 4523

Actually, in the default Metal LaF at least, it's just one Icon* which reacts to rollover/pressed/selected states by casting the Component passed to its paintIcon method to a JRadioButton and retrieving its model.

* private class javax.swing.plaf.metal.MetalIconFactory.RadioButtonIcon, obtainable via public static Icon getRadioButtonIcon()

Farhad, one easy way to get a larger circle could be to layer your own Icon, which simply draws a circle of the desired size, with the default Icon. See the HCenter/VCenter alignment sample on

luck, db
There are no new questions, but there may be new answers.
Farhad Rahmati
Ranch Hand

Joined: Dec 16, 2010
Posts: 96
Darryl Burke and Rob Spoor

Thank you very much for this information, I was thinking about Icon, but never tried. Yea I will have a go

wood burning stoves
subject: Resizing JRadioButton
Similar Threads
Resizing an image
Disable JFileChooser Maxmize button in Mac
Panel issue
Resize and rescale Date and Time Picker in android
How to make Resize JButton() on mouse click...