Skip to main content

how to double buffer some winws without doing other

No replies
Joined: 2010-03-22

I have an app that has a lot of windows. Some on tabbed panes. Some of the windows are in JInternalFrames. For a lot of reasons that are pretty involved, it is important to me to paint certain windows within some of the JInternal frames without double buffering...It would even be acceptable to paint without double buffering at the JDesktopPane level. However, to go any broader than that causes annoying flickering in other windows in the app when they would be fine using the default double buffering.

According to the documentation about double buffering at

It states "But the setting that really matters is on JRootPane, because that setting effectively turns on double-buffering for everything underneath the top-level Swing component....

Anyway, JInternalFrames contain a JRootPane and I have called setDoubleBuffering(false) up the entire hierarchy from my component up and including the JRootPane and it doesn't keep the double buffering from occuring.

Is there some way to have a control somewhere in my hierarchy where I can control the double buffering at a more granular level than the enitre app?

thank you