• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resizing an image

 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to resize/scale an image to fit to a label ..... i found a method named "getScaledImage" but dont know how to use it... help..
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
neelam aggarwal wrote:i found a method named "getScaledImage" but dont know how to use it... help..


Seeing as there's no method with that name in the standard JDK, you need to ask wherever you got the class that has that method.
 
neelam aggarwal
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i just surf on net & found this.... but this doesn't work as you said it does not exist.....
so please tell me how can i scale my image to fit in label....
 
Darryl Burke
Bartender
Posts: 5125
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are at least two ways. One can be found in the API for BufferedImage and another in the API for java.awt.Graphics
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic