JComponent double-buffering vs. trad. double-buffering in AWT

Hi there,

I'm accustomed to using the following drawing approach:

- JPanel, draw everything to offscreen buffer in paintComponent() and then draw offscreen buffer to screen while relying on JComponents' automatic double buffering. Everything is done in paintComponent().

Are there any ways of improving performance? What about the paint() - update() method with AWT components? Should I use that instead, since there is really no other use for Swing components here? What about speed differences between AWT and Swing generally?

I guess most of you have your own approach - pass it on, pass it on!

-wp

[640 byte] By [whitepapera] at [2007-9-28 10:04:45]
# 1
You shouldn't need to draw anything to an offscreen buffer if you're using JComponents. That's the benefit to having the built-in double-buffering in the first place.
markuskidda at 2007-7-11 23:41:26 > top of Java-index,Other Topics,Java Game Development...