Meaningless Drivel is fun!*
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: 685
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
Consider Paul's rocket mass heater.
subject: Adjusting image size to image label
Similar Threads
java swing repaint
Problems loading image into a JLabel located in a JScrollPane
Working with Image Icon
Image display with visor