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 Setting image size 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 "Setting image size" Watch "Setting image size" New topic
Author

Setting image size

Klaas Vredevort
Greenhorn

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!

Klaas
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
There is a method in Image called getScaledInstance.
 
wood burning stoves
 
subject: Setting image size
 
Similar Threads
Toolkit.getImage()
linux server load an image from file
Closing a frame
haveing trouble with applet animation plz help
getImage()