I have a little issue only on PowerDVD.
I use BufferedImage but some times, I have a flash just before the paint ?!
An idea ?
thanks for this advice, I modified all my app... Direct draw is bestter than paint().
Some platform call alone paint(). It's a bad way to use it !
Finally I solve my issue (programming issue).
Just before the paint, or when you call repaint()?
The best advice I can give about calling repaint() is: don't.
There's a pretty good chance that one of your parent containers
will erase the framebuffer before your paint() gets called, resulting
in a screen flash. HScene might have a way around this,
but whether it does or not, I wouldn't bet on it working on all
devices all the time. I'm not totally sure about this, because
I never use repaint draw myself.
Instead, if you want to do any kind of animation or flicker-free
screen update, I'd recommend using direct draw. This is where
you call Component.getGraphics(), and do your drawing directly
to the framebuffer. You also do your own double-buffering this
way, so you're guaranteed to always be replacing the old contents
of the framebuffer with the new contents, with no intervening
This is discussed in the HD cookbook, around page 17-13. I'd
also recommend taking a look at DirectDrawEngine in
com.hdcookbook.grin.animator, especially if you want to do
time-based animation with optimized drawing.
> Hi all,
> I have a little issue only on PowerDVD.
> I use BufferedImage but some times, I have a flash just before the paint ?!
> An idea ?
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Participation.
Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.