This discussion is archived
5 Replies Latest reply: Jan 12, 2012 11:28 AM by morgalr RSS

Drawing contents of a Graphics object inside another Graphics object

903537 Newbie
Currently Being Moderated
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

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points