Try calling setPreferredSize() on the image JPanel.
Type: Posts; User: copeg
Try calling setPreferredSize() on the image JPanel.
What do you mean 'doesn't work properly'? (btw could be just a copy/paste error but the top import will give a compile time error)
Leave it up to me to make things more complex than they should be...db's suggestion would be MUCH easier. However, if you wish to draw the images on a JPanel, you can to create a few panels and then...
Rather than use a JLabel, you can draw the image directly to a JPanel (in the paintComponent method, using the Graphics object drawImage).First load the image using ImageIO, and you can then resize...