Original Post
My program creates a background randomly in java. for(int t=0; t<8; t++){ g.setColor(new Color(100, 100, 200)); int x = (int)(Math.random() * 800) - 100; int y = (int)(Math.random() * 600) - 100; int size = (int)(Math.random() * 300); g.fillOval(x, y, size, size); } Problem is it doesn't store the coords, so it can't repaint. Is there some way I could store the background in a secondary canvas, akin to a dx back buffer, and then copy the secondary canvas back over the first in the paint method?