Why is it that when I attempt to repaint the entire Applet, the screen flashes (as if the repaint requests are slowed down due to many details being painted all at once), whereas a repaint to a JPanel added to the ContentPane of the JRootPane doesn't flash at all?

Then again, I'm not sure if the problem lies within eclipse or within NetBeans 6.1, although I'm fairly certain they're pointing to the same JRE...

8 Years
Discussion Span
Last Post by Ezzaral

It's kind of hard to say from a general standpoint, since it does depend on what you've coded after all, but keep in mind that repaintings of the top level container (Applet, JFrame, etc) are heavyweight AWT operations that use native code to redraw the top level window in the OS. Swing calls however (like contained JPanels) are lightweight internal repainting operations that are much more finely controlled for you through a repaint manager with double-buffering, incremental "dirty-region" repainting, etc.
You can read more about these differences in this article if you like: http://java.sun.com/products/jfc/tsc/articles/painting/

Votes + Comments
Always helpful =)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.