Thanks, I'll try and explain my problem...
I have an
applet foto cube It is signed, but thats just so you can save and load cubes.
Anyway the cube, uses double-buffering and is on a blue background...
(Just using 1 JPanel, no OverlayLayout here)
This works well... I noticed problems when I didn't use double buffering, there was some flickering when the cube was moving.
I noticed you can pass 'true' into the constructor to get double-buffering, but I don't think it worked when I tried is last.
My problem is:
Where I have the blue background(500 by 500), I would like to use an image/bufferedimage of the same size.
Clearly I can just put the line...
in above, but I tried this before, and it seemed to be a bit of a drag on the cpu which is already busy twisting and rotating the cube.
This is the reason I wanted to try and just paint the background image once(eg with OverlayLayout), then just repaint the cube on top.
The thing with a circle was just a
test to see if I could do it, but its now got a bit confusing with all this doublebuffering stuff.
I'm not sure what the ideal solution to this is.
Hope this makes it clearer.
Thanks for any help