| Author |
GIF's and IMAGEICON's...
|
Pat Ziel
Greenhorn
Joined: Nov 07, 2009
Posts: 9
|
|
Hello everyone. I have this issue:
I set an imageIcon on a JButton component. This imageIcon is an animated .gif I made.
When I run my program, the first time I click the animation is properly executed. Afterwards, when I click on other buttons that are present on my grid they skip to the last frame.
Here's the method that is being called:
Now, I assume the image is loaded once in memory and being animated once it doesn't do it again?
P.S I've made my image so that it repeats once. If I loop it, it works fine. But I don't want it to loop.
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
Moving to Swing.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
Andreas Pax Lück
Greenhorn
Joined: Nov 04, 2009
Posts: 18
|
|
hi!
i've got exactly the same complication. but i don't really understand what's meant with swing in this case. does the swing library contain a special resource loader or something else?
my animated gif isn't set on unlimited animation repetition. but i have to show the gif animation more than one time anyhow.
how can i reload the image file again?
best regards
PAX
|
"Wenn man irgendwann mal von allen akzeptiert wird, dann weiß man, dass man irgendwas falsch gemacht hat."
Excerpt by: Mr. Weidner
|
 |
 |
|
|
subject: GIF's and IMAGEICON's...
|
|
|