Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » WindowBuilder » How to scale an image in WindowBuilder?
How to scale an image in WindowBuilder? [message #1022199] Thu, 21 March 2013 13:26 Go to next message
Beau Buckley is currently offline Beau BuckleyFriend
Messages: 1
Registered: March 2013
Junior Member
Hey guys, I've started learning Java in Eclipse, and I couldn't find any forum answers or documentation about rescaling an image in Window Builder. It's quite daunting seeing as I'm new to programming, so I may have overlooked something.

I've put an image on the frame, but I want to scale the image 'image_1.png' to 200%.

JLabel lblNewLabel = new JLabel("");
lblNewLabel.setIcon(new ImageIcon(builder.class.getResource("/resources/image_1.png")));
lblNewLabel.setBounds(10, 7, 122, 22);


Is this also how I correctly should add an image to my window builder (Using a label?).

Thanks!
Re: How to scale an image in WindowBuilder? [message #1022725 is a reply to message #1022199] Fri, 22 March 2013 12:31 Go to previous message
Eric Clayberg is currently offline Eric ClaybergFriend
Messages: 979
Registered: July 2009
Location: Boston, MA
Senior Member
WindowBuilder does not offer any sort of image scaling function.

That capability would be dependent on the widget you use. As far as I know, the standard Swing JLabel does not offer that feature, so you would need to find a widget that does or scale the image yourself before applying it to the JLabel.
Previous Topic:Cannot install WindowBuilder Pro
Next Topic:internal error while parsing NatTable
Goto Forum:
  


Current Time: Fri Apr 26 12:30:00 GMT 2024

Powered by FUDForum. Page generated in 0.02200 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top