What exactly are you having problems with during the use of get and setLocation()... You can specify an x and y int as arguments or pass a point to it. You'll have to be more specific before I can really help.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Im pretty sure that the get method returns a point....From there it's up to the recipitent of the point to call the getX() getY() methods on that point. There's really now way to return both of those. You can create your own methods that could do something like this:
public Point2D getLocation()
{
return Point2D();
}
public int getX()
{
Point2D p = getLocation();
return p.getX();
}
public int getY()
{
Point2D p = getLocation();
return p.getY();
}
You'll have to check to make sure I'm right about getX() and getY()...I'm pretty sure that those exist, but make sure.
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
GetLocation() probably needs to make a call to the Point2D class. I'm guessing your class has a constructor that takes two arguments, an x and a y. If so, you could say:
public void getLocation()
{
return new Point2D(this.x,this.y);
}
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Where's your work and why are you posting in someone elses thread?
server_crash
Postaholic
2,111 posts since Jun 2004
Reputation Points: 113
Solved Threads: 20
Hi everyone,
can any body help!!!!!!!
Dude i don't mean to ride you up but server_crash is right why are you hijacking someone else's thread. If you want help post a thread so people can help you
Richard West
*****************************************************
freesoft_2000
Practically a Master Poster
623 posts since Jun 2004
Reputation Points: 25
Solved Threads: 10