This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes how to increase the icon size in radioButton Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to increase the icon size in radioButton" Watch "how to increase the icon size in radioButton" New topic
Author

how to increase the icon size in radioButton

sudheer kiran
Ranch Hand

Joined: Jun 26, 2008
Posts: 237

hi all want to increase the size of the icon in radion button /checkbox.
if i setDimestion it's not actually increases the icon size in radio button.
how can i increase the size of the icon


Sudheer
SCWCD, SCJP 5
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

May be useful: Toggle Button Icons.

Alternatively, you could create your own Icon implementation and set that as the default using UIManager.put(...). If you're in need of inspiration, read the source of javax.swing.plaf.metal.MetalIconFactory.RadioButtonIcon / CheckBoxIcon.

Not sure which method you're referring to as
setDimestion


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

Joined: Jun 26, 2008
Posts: 237

resolved by setting customized icons.

Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4523
    
    5

1. If you've created so many Icons to substitute the single Icon in MetalIconFactory, it looks like you've missed the point that one of the parameters to the Icon method paintIcon(...) is the Component to which the Icon is to be painted.

2. If customize the LaF using UIManager.put(...) you shouldn't need to invoke setIcon(...) at all.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to increase the icon size in radioButton
 
Similar Threads
How to increase radio button size?
JButton, icons and size.
How to stretch icon to fit on JToggleButton
Help Needed For Resizing of Swing Comp
jbutton background image