Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Animated ImageIcon .gif in JLabel

843805Apr 19 2007 — edited Apr 18 2008
Hi. I have a 4 frame .gif animation of a flashing star. When I load it into an ImageIcon using the ImageIcon constructor;

ImageIcon icon = new ImageIcon("star.gif");

and attach it to a JLabel;

JLabel starLabel = new JLabel(icon);

the animation steps through it's frames so fast that it looks like it must be a graphic glitch. It doesn't matter how many times I slow down the animation using various tools (yes I even made it go 1 frame per 10 seconds in internet explorer but no difference), the animation is still playing at an unacceptable speed.

Am I doing this all wrong?
Thanks for any help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 16 2008
Added on Apr 19 2007
6 comments
1,603 views