So here is update(...) in its entirety: public void update( Graphics g ) { // clear the applet and call paint: int w = getSize().width; int h = getSize().height; g.setColor( getBackground() ); g.fillRect( 0, 0, w, h ); g.setColor( getForeground() ); paint( g ); } |