File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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: 692
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 agree. Here's the link:
subject: Adjusting image size to image label
It's not a secret anymore!