• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What can be done to stop flickering of the image??

 
Nitesh Panchal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
i know that double buffering can reduce flickering but what if the buffer(image) itself is flickering. I mean here i am repaint the image every 1 second but it flickers a lot. Here's the code



what can be done in this case? Thanks in advance! >
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know that double buffering can reduce flickering but what if the buffer(image) itself is flickering. I mean here i am repaint the image every 1 second but it flickers a lot.

I don't understand what you mean by "the buffer itself is flickering" - you're not using any buffering. Have you tried using double-buffering?

See http://java.sun.com/docs/books/tutorial/extra/fullscreen/doublebuf.html for some background information and http://www.realapplets.com/tutorial/DoubleBuffering.html for a code example.
 
Nitesh Panchal
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ohh!!
i forgot to override the update() . Now it works smooth! thanks :d
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic