This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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: 2398
There is a method in Image called getScaledInstance.
I agree. Here's the link:
subject: Setting image size
It's not a secret anymore!