// this does the drawing
g.setColor(Color.green) ;
// move circle along the top of the window
circleYPosition = 0 ;
for (circleXPosition = 0 ; circleXPosition <= 240 ; circleXPosition += movement)
{
g.drawOval(circleXPosition,circleYPosition,60,60) ;
}
// move circle along the right edge of the window
circleXPosition = 240 ;
for (circleYPosition = 0 ; circleYPosition <= 240 ; circleYPosition += movement)
{
g.drawOval(circleXPosition,circleYPosition,60,60) ;
}
// move circle along the bottom of the window
circleYPosition = 240 ;
for (circleXPosition = 240 ; circleXPosition >= 0 ; circleXPosition -= movement)
{
g.drawOval(circleXPosition,circleYPosition,60,60) ;
}
// move circle along the left edge of the window
circleXPosition = 0 ;
for (circleYPosition = 240 ; circleYPosition > 0 ; circleYPosition -= movement)
{
g.drawOval(circleXPosition,circleYPosition,60,60) ;
}