The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

Importing gif/pictures

Hi guys, i'm making a game for my computer science class and i want to make the interface look cool. To do this i would like to import some images, and more specifically, i would like to have a character talking. The character is just supposed to move, thats it, so i thought about using a gif to do this.

How can i import pictures, and more specifically gif's into java so that i can use it in my program?

Re: Importing gif/pictures

I'm not sure if it supports animated gif's, if you want to do animations you may be better off having a series of picture files and switching between which one to draw on a separate thread (you'll probably want to use a swing timer).