Quantcast
Channel: WP快站
Viewing all articles
Browse latest Browse all 233

Java swing problem transparent animation gif

$
0
0

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.

CodeExample 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


Viewing all articles
Browse latest Browse all 233

Trending Articles