This specific GIF animation plays too fast, like 100x the normal speed. Is there any fix to this? or should I just slow the "normal speed of the GIF further"?
public class Test {
private static final String url = "https://i.sstatic.net/AnrWw.gif";
private void display() throws MalformedURLException {
JFrame f = new JFrame("Test");
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.add(new JLabel(new ImageIcon(new URL(url))));
f.pack();
f.setLocationRelativeTo(null);
f.setVisible(true);
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
new Test().display();
} catch (MalformedURLException ex) {
ex.printStackTrace(System.err);
}
}
});
}
}
I tried using an other animated gif image which works just fine, the problem is probably your gif image, try slowing down the frame rate of your gif or lowering the quality.