I am trying to put a ".gif" image on a label. The image loads , but it is static (no animation). Any guesses why? and how to solve it?
Code that I am using:
BufferedImage img1=ImageIO.read(TCPServer.class.getResource("filecopy.gif"));
JLabel filetransferpic = new JLabel(new ImageIcon(img1));
Note: I don't want to use..
JLabel filetransferpic = new JLabel(new ImageIcon("G:\\filecopy.gif"));
..approach. Because in this approach I will have to give drive path and place the image in drive. I want the image in project folder "src".