Reputation: 203
I have for example the following picture displayed in my gui:
http://www.zielpunkt.at/image/produkte/1354097303-airwick.jpg
Unfortunately the colors are distorted (pink background):
My code:
URL pictureURL = new URL(product.getBild());
BufferedImage myPicture = ImageIO.read(pictureURL);
JLabel picLabel = new JLabel(new ImageIcon( myPicture ));
c.fill = GridBagConstraints.HORIZONTAL;
c.gridwidth = 2;
c.gridx = 0;
c.gridy = 5;
panel.add(picLabel,c);
Looking forwart to your answers! Regards,
Most of my images look like this, but when I look at the graphic on the url it looks normal.
Upvotes: 1
Views: 362