Resize a picture to fit a JLabel
Outline Here are the steps to follow. Read the picture as a BufferedImage. Resize the BufferedImage to another BufferedImage that’s the size of the JLabel. Create an ImageIcon from the resized BufferedImage. You do not have to set the preferred size of the JLabel. Once you’ve scaled the image to the size you want, the … Read more