aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes how to eliminate flicker in this simple slideshow app? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "how to eliminate flicker in this simple slideshow app?" Watch "how to eliminate flicker in this simple slideshow app?" New topic
Author

how to eliminate flicker in this simple slideshow app?

Mark Marziale
Greenhorn

Joined: Apr 24, 2002
Posts: 2
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

Joined: Aug 16, 2005
Posts: 14149
    
  18

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 ]

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Charles Woods
Greenhorn

Joined: Jun 04, 2007
Posts: 7
I hope this helps. I don't know much, but I read that 'double buffering' JComponents reduces flickering.
Mark Marziale
Greenhorn

Joined: Apr 24, 2002
Posts: 2
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

Joined: Jan 29, 2003
Posts: 8791
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.


A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to eliminate flicker in this simple slideshow app?