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...
Type: Posts; User: burntcasadilla
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...
i have this code that creates a new ball every 3 seconds
if (timeSinceLastNewDot >= NEW_DOT_FREQ)
{
int newX = randomNumber();
int newY = randomNumber();
...
public Rectangle getBallBounds()
{
for(int i = 0; i < BALLS.size(); i++)
{
new Rectangle(BALLS.get(i).x, BALLS.get(i).y, 20, 20);
}
return ???;
...
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>...
alright. now i have this but it does absolutely nothing lol
public Rectangle getFixedBallBounds()
{
return new Rectangle (250, 250, 20, 20);
}
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...
the paintmainball method
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...