MovingPolygons.java (cont’d)
The paint(…) method is called repeatedly from the run() method: public void paint( Graphics g ) { Rectangle r = this.getBounds(); for ( int i = 0; i < numPoly; i++ ) { polygon[i].checkBounds( r ); polygon[i].move(); polygon[i].fill( g ); } }