File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Setting image size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Setting image size" Watch "Setting image size" New topic

Setting image size

Klaas Vredevort

Joined: Dec 27, 2005
Posts: 29
Hey guys

I have an Applet with a width of 500 and a height of 500 as well. i have an Image, jaspershangman.jpg, that I want to load to fit the entire window.

What can I do... I suppose it should be quite straightforward...

Thanks in advance!

Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
There is a method in Image called getScaledInstance.
jQuery in Action, 3rd edition
subject: Setting image size
It's not a secret anymore!