Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Setting image size

 
Klaas Vredevort
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a method in Image called getScaledInstance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic