I have this Java Swing code :
ImageIcon img;
img = new ImageIcon("./pictures/icon2.jpg");
label1.setIcon(img);
I change the size of the label but I need a very big label to show a big image. Cause I need to show more images with different sizes in the same label I need to show the full image in a smaller than image size label.
It works fine now.
File file = new File("./pictures/icon2.jpg");
BufferedImage bimg = ImageIO.read(file);
Image scaled = bimg.getScaledInstance(500, 500, Image.SCALE_SMOOTH);
ImageIcon icon = new ImageIcon(scaled);
photo_result.setIcon(icon);