Is there any way to add an animated GIF to a JButton for example and control it?
For example:
- Pause it at frame 1, then make it display frame 2 (Paused at frame 2)
- Set the delay between the frame animations
- Have it stop when it reaches the end (Does not replay)
I’ve never had a reason to break down GIFs but as near as I can tell, Java can access each frame of a GIF.
Whatever your solution, it’s going to require some amount of coding. Whether it’s a lot or a little depends greatly on your requirements and your coding skills.
Peaking around Internet, some people are saying a javax.imageio.ImageReader can do what you want: http://docs.oracle.com/javase/6/docs/api/javax/imageio/ImageReader.html