//jleblanc 11.10.05: basic arraylist int MAX = 10; ArrayList blist = new ArrayList(); void setup() { size(300,300); background(0); noStroke(); fill(255); smooth(); for (int i = 0; i < MAX; i++) { blist.add(new Ball( random(0,200),random(0,200) )); } } void draw() { background(0); for (int i = 0; i < blist.size(); i++) { Ball b = (Ball) blist.get(i); b.render(); } } class Ball { float x; float y; Ball(float x_, float y_) { x=x_; y=y_;} void render() { ellipse(x,y,10,10); } }//end ball class