Java swing problem transparent animation gif

67 Views Asked by At

Why in java when I try to use a transparent gif animation its image is distorted or has pixel inconsistency? I wanted to make sure if the problem was Jlabel's problem, but I showed the gif in different components and the same problem appeared. The gif has already been checked many times in other environments and looks completely fine.

Code Example of how I display the image

JLabel labelPokemonIcon = new JLabel();
ImageIcon imageIcon = new ImageIcon(getClass().getResource("/app/pokemon/gif/" + nameIcon));
labelPokemonIcon.setIcon(imageIcon);

Gif original

gif animation

gif animation

JAVA SWING

component swing

0

There are 0 best solutions below