Results 1 to 2 of 2
  1. #1
    royyoo123 is offline Member
    Join Date
    Nov 2013
    Posts
    1
    Rep Power
    0

    Default it cant find the symbol?

    Here's my code:

    import objectdraw.*;
    import java.awt.*;

    public class TouchWindow extends WindowController
    {
    int counter = 0;
    pizza[] joe;

    public boolean u;
    Location neww;

    Movable argh;


    public void begin()
    {
    joe = new pizza[1];
    for(counter = 0; counter < joe.length; counter++)
    {
    joe[counter] = new pizza(canvas.getWidth()*Math.random(),
    canvas.getHeight()*Math.random(), canvas);
    // argh = joe[counter];
    }
    }



    public void onMousePress(Location old)
    {
    for(counter = 0; counter < joe.length; counter++)
    {
    if(joe[counter].contains(old))
    {

    u = true;
    // argh = joe[counter];
    // old=neww;
    break;
    }

    else
    {
    u = false;
    }



    }
    }

    public void onMouseDrag(Location old)
    {
    if(u)
    {
    joe[counter].move(neww.getX()-old.getX(), neww.getY()-old.getY());
    neww=old;
    }
    }

    }

    The error i'm getting is that it can't find the symbol at joe[counter].contains(old)) and joe[counter].move(neww.getX()-old.getX()...
    How can I fix this? Thx I'm trying to make an array of pizzas and drag them around. Movable is my interface to move shit

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,224
    Rep Power
    20

    Default Re: it cant find the symbol?

    Post the full error message.
    It should also give an idea as to which bit of those lines it does not understand.

    Also, when posting code please wrap it in [code] tags [/code].
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Still Cannot Find Symbol
    By SamJava_the_Hut in forum New To Java
    Replies: 7
    Last Post: 08-24-2013, 12:27 AM
  2. cannot find symbol
    By vastrolorde in forum New To Java
    Replies: 11
    Last Post: 01-04-2013, 12:11 PM
  3. Cannot find symbol
    By Johanis in forum New To Java
    Replies: 19
    Last Post: 11-04-2010, 09:13 PM
  4. Replies: 9
    Last Post: 10-18-2008, 09:26 PM
  5. Replies: 3
    Last Post: 05-01-2008, 09:30 AM

Posting Permissions

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