This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Adjusting image size to image label Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Adjusting image size to image label" Watch "Adjusting image size to image label" New topic

Adjusting image size to image label

Tristan Van Poucke
Ranch Hand

Joined: Jun 30, 2008
Posts: 47
I have an Imagelabel wich shows a particular image.
At the moment it only shows a part of the image, because the images I want it to show are mostly bigger than the label I use to show them in.
How can I show the image in the same size as the imagelabel?
Norm Radder
Ranch Hand

Joined: Aug 10, 2005
Posts: 691
If you use the drawImage() method, you can scale the image to your requirements.
Otherwise post the relevant code to show how you are doing it.
Craig Wood
Ranch Hand

Joined: Jan 14, 2004
Posts: 1535
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Adjusting image size to image label
It's not a secret anymore!