I am making a game for my computer science class and one of the requirements is a Player class that can display the player at the proper x and y coordinates on the screen. I made a method to draw the player but when I tried to compile the class , it told me that I couldn't use the getImage(getDocumentBase(), "image.gif"); to get my pictures into the class. My method goes like this.....
public void drawPlayer(Graphics g)
g.drawImage(player , x_pos , y_pos , parent);
is there any way to import the image into my Player class so that I can just call the method in my Main class to draw the character?
-Thx in advance
Come and play the games.....