I\'m creating a UI using Swing and I want to display an image in a JLabel. The code I use is the following:
JLabel
JLabel label = new JLabel(new Image
As discussed here, your JPEG image may contain spurious transparency information. One simple expedient is to render the image in a buffer having a compatible color model, as shown here.