Fit image to JLabel or JButton
843806Apr 14 2008 — edited Apr 15 2008I have searched the topic and found some instances of the Image package being used to resize images.
I have a DB of images (think photos) that I want to display based on user input. The display size will be the same but the actual picture dimensions stored in the DB won't necessarily be.
My experience is that the amount of image displayed in the JLabel is entirely based on the size of the image itself (i.e. a small image is completely displayed while a large image is partially displayed.
I wish to have the image fit to the JLabel (or JButton) dynamically.
Is there an obvious method I am overlooking?
TIA,
Sil