Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

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

 
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! >
 
Rancher
Posts: 43016
76
  • 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
    Bookmark Topic Watch Topic
  • New Topic