Currently in my code I have a BufferedImage drawn like:
Graphics2D g2d = (Graphics2D) g;
g2d.transform(at); //at is an AffineTransform that just rotates the .gif
g2d.drawImage(sharkie, xCenter-5*radius, yCenter-3*radius, 10*radius, 6*radius, null);
I already have it fully functioning as a BufferedImage, but as expected it shows only the first frame. I was wondering if anyone knew of a way that is analogous to BufferedImage that works for animated gifs. I can't seem to get swing to work with the technique of adding it to a JButton. I also cannot figure out if there is a viable ImageObserver that would animate the .gif in the drawImage() call.
I am willing to try anything, but I am most interested in the possibility of making the draw call work with an ImageObserver as that would be only a small change.
Thanks all!