Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

i want to animated the pic at applet like a gif

 
ali rafiq
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
im loading the three pic at applet with same layer .. show one by one by the thread but it load third at time of initializing of applet it has loaded the pic i want it after the loading of applet
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Start the thread in the start() method of the applet. If it still doesn't work, try making the animation thread sleep() a few seconds before starting the animation.

You also may need to load your images with a MediaTracker... The applet may be trying to animate your images before the images are completly loaded.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic