GraphicsContext validity

If I have a buffered image is there anyreason I can’t do a myImage.createGraphics() call and then just use that context for the rest of the program run? I figure it doesn’t make sense to keep calling that method each frame, is possible.

Regards,
Dr. A>

just hold on to the Graphics2D object, it’ll never change. If you’re using BufferStrategy I’m pretty sure you have to keep calling it as the Graphics2D object it gives is attached to the current BufferedImage you have available, which switches back and forth after each .show(). However, if you just have one BufferedImage object, the Graphics2D associated with it will never change and you can hold on to that.