Skip to Main Content

Drawing contents of a Graphics object inside another Graphics object

903537Dec 4 2011 — edited Jan 12 2012
Hello there. Im making a simple game in java, and ive got a few questions.

I got a class named 'background', witch has the drawBkg method that is responsable for drawing bkg images. So, ive got into my applet's paint method:
public void paint(Graphics g) {

           background.drawBkg(g);

}
However, this would draw the background over and over again. I wish to know, how could i draw the background on a Graphics object, just like the drawBkg method does, then just draw the already draw'd bkg to the Graphics of the paint method.

Thanx for your attention, would apreciate any help.

[]´s
Comments
Post Details
Added on Dec 4 2011
5 comments
2,658 views