• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to eliminate flicker in this simple slideshow app?

 
Mark Marziale
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Any help would be appreciated. Thanks - Mark

-- cut here --

-- cut here --
[ July 06, 2007: Message edited by: Mark Marziale ]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15495
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

Please use code tags when you post code.

I haven't looked in detail at your code, but the standard way to make smooth animations without flicker is to usse double buffering. Here is an example. You can find more information if you search on "java double buffering" with Google.
[ July 06, 2007: Message edited by: Jesper Young ]
 
Charles Woods
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I hope this helps. I don't know much, but I read that 'double buffering' JComponents reduces flickering.
 
Mark Marziale
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks to all, I will investigate double buffering.

Apologies for not using code tags, didn't know.

- Mark M.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm guessing here, but are you doing the image updates on the program's main thread? See if scheduling the image changes via SwingUtilities invokeLater or invokeAndWait makes any difference.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic