FileDocCategorySizeDatePackage
Face.javaAPI DocExample560Tue Dec 02 02:52:40 GMT 1997None

Face

public class Face extends Applet

Fields Summary
Constructors Summary
Methods Summary
public voidpaint(java.awt.Graphics g)

		int width = getSize().width;
		int height = getSize().height;
		int w = width*2/3;
		int h = height*2/3;
		g.setColor( Color.magenta );
		g.fillOval( (width-w)/2, (height-h)/2, w, h );
		g.setColor( Color.green );
		g.fillOval( (width-w)/2 + w/8, (height-h)/2 + h/8, w/8, h/8 );
		g.fillOval( (width-w)/2 + 5*w/8, (height-h)/2 + h/8, w/8, h/8 );
		g.drawLine( (width-w)/2 + w/4, (height-h)/2 + 3*h/4,
			(width-w)/2 + 3*w/4, (height-h)/2 + 3*h/4 );