• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

============ applet's refreshing problem ============

 
Mellihoney Michael
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I drew a motion picture (animation.gif) on my applet by writing "g.drawImage(........)" in the "public void paint(Graphic g)" method.
The problem is the applet PANEL always refreshed when the motion picture was playing. Can anybody tell me how to solve this problem? Or How to reduce the side-effect brought by the refreshing.
regards,
mellihoney
[ August 31, 2003: Message edited by: Mellihoney Michael ]
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think by "motion picture" maybe you're talking about an animated GIF? If that's the case, there's not much you can do that I'm aware of. What you could do, instead, is to do the animation explicitly in Java -- i.e, have one GIF for each frame, and paint them one at a time; this way refreshing won't restart the animation. There are several animation examples in the demos/applets directory that comes with the JDK.
 
Mellihoney Michael
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic