Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

reducing animation flickering  RSS feed

 
baber owais
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HOW I REDUCE ANIMATION FLICKERING IN JAVA
 
Ajith Kallambella
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Flickering is a result of frequently clearing the background and repainting it. You might want to try overriding the update() method and directly calling the paint method from it.
Checkout this link that has some code samples that teach how to avoid flickering.
Hope that helps!
Ajith
 
Thomas Paul
mister krabs
Ranch Hand
Posts: 13974
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The other thing you can do is use double-buffering.
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the CodeBarn The HelloAnimThread series covers graphics and in the 4th one HelloAnimThreadC, it shows double buffering
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!