Search:

Type: Posts; User: burntcasadilla

Search: Search took 0.20 seconds.

  1. Re: returning a rectangle through an arraylist

    alright im back at square one and im completely confused. ill take this step by step:
    1. created this method within the ball class in order to create a method that returns the dimensions of the ball...
  2. Re: returning a rectangle through an arraylist

    i have this code that creates a new ball every 3 seconds


    if (timeSinceLastNewDot >= NEW_DOT_FREQ)
    {
    int newX = randomNumber();
    int newY = randomNumber();

    ...
  3. Re: returning a rectangle through an arraylist

    public Rectangle getBallBounds()
    {
    for(int i = 0; i < BALLS.size(); i++)
    {
    new Rectangle(BALLS.get(i).x, BALLS.get(i).y, 20, 20);
    }
    return ???;
    ...
  4. returning a rectangle through an arraylist

    i have an arraylist that creates balls at random points x and y with set height and width of 20. each ball is created every 3 seconds and then stored in the arraylist



    public ArrayList<Ball>...
  5. Replies
    7
    Views
    452

    Re: mainBall object wont update

    alright. now i have this but it does absolutely nothing lol



    public Rectangle getFixedBallBounds()
    {
    return new Rectangle (250, 250, 20, 20);
    }
  6. Replies
    7
    Views
    452

    Re: mainBall object wont update

    oh i figured it out lol. i changed the values in paintMainBall to xpos and ypos.

    another unrelated question tho... how do i use the getBounds method? i have an object fixedBall at 250, 250 with...
  7. Replies
    7
    Views
    452

    Re: mainBall object wont update

    the paintmainball method
  8. Replies
    7
    Views
    452

    mainBall object wont update

    ive created an object called mainBall which is just a little black ball that wont change position on the screen. the coordinates of the ball change but the actual ball itself wont change position and...
Results 1 to 8 of 8