Search:

Type: Posts; User: jps

Search: Search took 0.22 seconds.

  1. Replies
    7
    Views
    2,220

    Re: returning a rectangle through an arraylist

    Looks good to me. I think the method could probably be static. Each ball would use the same process to return it's own bounds.


    Sounds ok to me, without seeing the rest of the code.
    1)Calling a...
  2. Replies
    7
    Views
    2,220

    Re: returning a rectangle through an arraylist

    Sure you can
  3. Replies
    7
    Views
    2,220

    Re: returning a rectangle through an arraylist

    Ok, lets have a looksee one step at a time.

    It seems to me you want a Rectangle for EACH ball, your method can only return ONE Rectangle. You would have to return BALLS.size() Rectangles to get...
  4. Replies
    7
    Views
    2,220

    Re: returning a rectangle through an arraylist

    public Rectangle getBallBounds()
    {
    for(int i = 0; i < BALLS.size(); i++)//BALLS.size() might as well just be 1....
    {
    //....because the first time...
Results 1 to 4 of 4