I'm currently writing a small game (Applet) and I've ran into a problem with double buffering. Everything works just fine when I draw the game to the graphics object that is passed as a parameter to the Applet's paint method (3-5% cpu usage at 60 fps). The heavy flickering is annoying though so I've tried to implement double buffering to get rid of this.
So I've made an image the size of the screen and then try to pass its Graphics object down to my draw methods just like I did before with the "regular" paint Graphics object and then finally draw this image to the screen. However instead of the 3-5% cpu usage it had before, it's now at a steady 25% (quadcore) and nearly completely freezes (this even happens without drawing the image to the screen).
Trying to fix this I've figured out that the problem seems to be drawingImages to the image's graphics object as methods like drawRect() don't seem to give the same problem.
If someone could help me with any kind of solution it would be greatly appreciated.