for (int i = 0; i < balls.size(); i++) {
Ball ball = (Ball) balls.get(i);
ball.calc();
if (client.isOnScreen(ball.x - ball.d / 2, ball.y - ball.d / 2,
ball.d, ball.d)) {
ball.draw();
}
}
// You can also read incoming messages in frameEvent
/*if (c.messageAvailable()) {