Results 1 to 2 of 2
Thread: Help With project
- 01-14-2010, 08:45 PM #1Member
- Join Date
- Jan 2010
- Rep Power
Help With project
Ok thanks for taking the time to help, so i have to create the helicopter game for a project and if you dont know what that is its basically a game where if you hold the mouse button it the helicopter goes up and if you release it goes down and the point is to dodge rocks and get far. Well anyway I have to create the background because im working with a partner and he is going to make the game applet and something else. I made a background called terrain but I cant test what it's drawing because I need the applet for that. It compiles fine but im not sure what its making. So can anyone tell me if its possible to test it without the applet. When I tried to test it, a box came up that says method call and im not sure what to write in it.
This is what I have so far.
public class Terrain
public void drawTerrain(Graphics g)
and i want to see what its making so i can keep adjusting. (Im trying to make it so there is a box going across the top and one going across the bottom so that if they go below that they will reset, etc.) So anyone have any ideas how i can test it?
- 01-15-2010, 12:16 AM #2
First off, you're going to have to extend an Applet (JApplet or Applet).
Second, drawTerrain is not a method of JApplet or Applet. The method for Applet is paint(Graphics g) - I have no idea about JApplet.
Third, try this:
int terrainX = 0; int terrainY = 0;"Experience is what you get when you don't get what you want" (Dan Stanford)
"Rise and rise again until lambs become lions" (Robin Hood)
- By ADARSH in forum New To JavaReplies: 10Last Post: 10-08-2009, 03:27 PM
- By Winniee in forum New To JavaReplies: 34Last Post: 02-18-2009, 09:22 AM
- By itaipee in forum EclipseReplies: 1Last Post: 12-28-2008, 08:12 PM
- By billdara in forum New To JavaReplies: 1Last Post: 03-12-2008, 05:05 PM