Use the Canvas if you need hardware double-buffering badly enough that you're 
willing to deal with the Z-ordering issues that you get from mixing Swing and 
AWT widgets. Otherwise, use a JPanel. You cannot use a Canvas inside of a 
JScrollPane, for one thing.

Rendering outside of the event thread can be iffy. I wouldn't try using a 
VolatileImage outside the event thread, but a BufferedImage should work. One 
thing that we should make clear is that getting hardware acceleration (for 
things like blitting the image) and rendering outside the event thread will be 
pretty much mutually exclusive. (Unless you're doing some really deep AWT 
hacking.)

Are we talking about rendering an animation, or rendering a graphic 
infrequently (say, in response to button clicks)? What you want to do really 
depends on the answer to that.
[Message sent by forum member 'afishionado' (afishionado)]

http://forums.java.net/jive/thread.jspa?messageID=301626

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to