.gif imagem não avança ao adicioná-la ao painel JTabbed

Eu tenho um JFrame. Em que eu tenho dois recipientes, ou seja, dois JPanel. um painel contém uma imagem. outro possui um JButton. Em seguida, esses dois são adicionados ao JTabbedPane.

Meu problema é usar uma imagem .gif, a imagem se torna estática como qualquer outra imagem .jpg normal. Alguém pode me ajudar com mais algumas idéias?

Aqui está o meu código:

import java.awt.Component;
import java.awt.Dimension;
import java.awt.Frame;
import java.awt.Graphics;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.URL;
import java.net.UnknownHostException;
import javax.imageio.ImageIO;
import javax.imageio.stream.ImageInputStream;
import javax.swing.Icon;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JDesktopPane;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
import javax.swing.UIManager.LookAndFeelInfo;

public class ICLOUD implements ActionListener {

private BufferedImage bg;
JButton b1;
private Object frame1;
JFrame frame2 = new JFrame();

  JDesktopPane desktop = new JDesktopPane();
    public ICLOUD() {
    try {
        URL url = this.getClass().getResource("anigif.gif");
        bg = ImageIO.read(url);

    } catch (IOException ex) {

    }

    JPanel tabPanel = new JPanel(new GridBagLayout()) {
        @Override
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            g.drawImage(bg, 0, 0, getWidth(), getHeight(), this);
        }


        @Override
        public Dimension getPreferredSize() {
            return new Dimension(400, 300);
        }
    };



    JPanel buttons = new JPanel(new GridLayout(4, 1, 15, 15));
    buttons.setOpaque(false);



    ImageIcon icon5 = new ImageIcon(ICLOUD.class.getResource("hi.jpg"));

    b1=new JButton("Hello");

    buttons.add(b1);





    tabPanel.add(buttons);


    JTabbedPane tabPane = new JTabbedPane();
    tabPane.addTab(null,icon5, tabPanel);

    JFrame frame = new JFrame("I-CLOUD");
    b1.setVisible(true);
    frame.setContentPane(tabPane);
    frame.pack();
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setLocationByPlatform(true);
    frame.setVisible(true);
}






public static void main(String[] args) {

    try {
        for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {
            if ("Nimbus".equals(info.getName())) {
                UIManager.setLookAndFeel(info.getClassName());
                break;
            }
        }
    } catch (Exception e) {

    }
            ICLOUD r=new ICLOUD();
        }






@Override
public void actionPerformed(ActionEvent e) {
    // TODO Auto-generated method stub

}



 }

questionAnswers(1)

yourAnswerToTheQuestion