[JAVA2D] Must all drawing be performed on the EventQueue thread?
I know that when I draw to the graphics context of a component, it's
important to draw everything on the EventQueue. But does that rule also
apply to an internally created image? For example, if I code:
BufferedImage image = new BufferedImage(width, height,
Graphics2D gc = (Graphics2D) image.getGraphics();
gc.drawRectangle(100, 100, 300, 400);
Since the image is not displayed yet, I would think it is kosher to call
this code from a non-EventQueue thread. Adding the image to a component,
of course, would have to occur on the EventQueue thread.
Am I correct in this assumption, or off-base?
To unsubscribe, send email to firstname.lastname@example.org and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
email@example.com and include in the body of the message "help".