I don't understand why this is happening:
I have an integer being passed to a label object:
int NTURNS = 3;
for (int i = NTURNS; i > 0; i--){
printTurns(i);
buildBall();
}
and printTurns is this:
private void printTurns(int i){
GLabel turns = new GLabel("" + i);
remove(turns);
add(turns, (WIDTH - PADDLE_WIDTH), (BRICK_Y_OFFSET / 2));
}
This will print the number of turns left in the game at the top. I have the remove(turns); there to remove the text so the next text won't overlap the old, but this is not working for some reason.
The numbers are stacking on top of eachother. Why is that?