FileDocCategorySizeDatePackage
cross.javaAPI DocExample928Tue Aug 08 17:11:32 BST 2000None

cross

public class cross extends Applet

Fields Summary
private int
movement
private int
circleXPosition
private int
circleYPosition
Constructors Summary
Methods Summary
public voidpaint(java.awt.Graphics g)

	   		// this does the drawing
	
		g.setColor(Color.red) ;
		
		// move circle from top to bottom
		circleXPosition = 120 ;
		for (circleYPosition = 0 ; circleYPosition <= 240 ; circleYPosition += movement)
		{
			g.drawOval(circleXPosition,circleYPosition,60,60) ;
		}
		
		// move circle from left to right
		circleYPosition = 120 ;
		for (circleXPosition = 0 ; circleXPosition <= 240 ; circleXPosition += movement)
		{
			g.drawOval(circleXPosition,circleYPosition,60,60);
		}