Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2010
    Rep Power

    Default 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.

    import java.applet.Applet;
    import java.awt.*;
    import java.awt.image.*;
    import java.awt.event.*;

    public class Terrain
    int terrainX;
    int terrainY;

    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?

  2. #2
    Lil_Aziz1's Avatar
    Lil_Aziz1 is offline Senior Member
    Join Date
    Dec 2009
    United States
    Rep Power


    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:
    Java Code:
         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)

Similar Threads

  1. Project
    By ADARSH in forum New To Java
    Replies: 10
    Last Post: 10-08-2009, 03:27 PM
  2. Help on my project!!
    By Winniee in forum New To Java
    Replies: 34
    Last Post: 02-18-2009, 09:22 AM
  3. open existing project project ..
    By itaipee in forum Eclipse
    Replies: 1
    Last Post: 12-28-2008, 08:12 PM
  4. Could anyone help with project?
    By billdara in forum New To Java
    Replies: 1
    Last Post: 03-12-2008, 05:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts