inserting Animated .gifs into GUI


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: inserting Animated .gifs into GUI

  1. #1
    Join Date
    Nov 2002
    Posts
    8

    inserting Animated .gifs into GUI

    Hi,

    Fairly new to Java and need some help creating a GUI. I am trying to build a speech therapy tool for children with speech impediments. When they 'perform' correctly they are 'rewarded' with a small animation. I was hoping to accomplish the animation by displaying an animated .gif to the screen as an icon.

    Currently I have created an internal frame to display the image. Here is my real problem. The gif only does the animation sequence once. If I open the internal frame again with the same image the animation does not repeat itself. I have tried to load the image in a loop to see if this will maintain the illusion of constant animation but no luck. I have also tried loading the image alternating it with a blank image to see if this will maintain animation. So far nothing has worked. Is there any way to load an animated gif into a GUI and have it retain CONTINUOUS animation?

    If not, does anybody have any other ideas on animation options and how to implement it?

    Using Java 2 sdk v.1.4.1
    Platform Windows 98

    Thanks for your time,
    Riesa

  2. #2
    Join Date
    Jul 2002
    Posts
    60

    Lightbulb

    Hi,
    This sample applet at JavaBoutique (with source code and a customized package included) appears to give you some hints on solving the problem:

    http://javaboutique.internet.com/GIFCanvas/

    Hope it helps!

    Jim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center