I don't have a Player class. I have Ball, PoolHustler(main applet) and Vector2 classes. When the applet starts the balls are positioned using this code in the start() method of the PoolHustler class:
b[0] = new Ball(200,425,0,0);
b[1] = new Ball(200, 140, 0, 0);
b[2] = new Ball(190, 120, 0, 0);
b[3] = new Ball(210, 120, 0, 0);
b[4] = new Ball(180, 100, 0, 0);
b[5] = new Ball(200, 100, 0, 0);
b[6] = new Ball(220, 100, 0, 0);
b[7] = new Ball(170, 80, 0, 0);
b[8] = new Ball(190, 80, 0, 0);
b[9] = new Ball(210, 80, 0, 0);
b[10] = new Ball(230, 80, 0, 0);
b[11] = new Ball(160, 60, 0, 0);
b[12] = new Ball(180, 60, 0, 0);
b[13] = new Ball(200, 60, 0, 0);
b[14] = new Ball(220, 60, 0, 0);
b[15] = new Ball(240, 60, 0, 0);
The balls are then painted on the screen using the following code within the paint() method again in the PoolHustler class:
for(int i = 0; i < b.length; i++)
if(b[i] != null)
b[i].display(g, colours[i]);
This for loop goes throught the array of balls and assigns the corresponding ball colour with the numbered ball. For example the cue ball b[0] will be white and b[5] will be black in accordance with the order of the colours. I don't have get/setColour and the colour will not be null initially but will be null once a ball is potted.