import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.geom.*;
import java.util.Random;


public class FiftySevenCircles extends JApplet {

    public void init() {
	getContentPane().add( "Center", new Circles());
    }

    public void start() {
    }
    
    public void stop() {
    }

}

class Circles extends JComponent implements Runnable {

    public Circles() {
	Thread t = new Thread(this);
	t.start();
    }

    public void paint(Graphics g) {
	Graphics2D g2 = (Graphics2D)g;
	
	// set the background color
	g2.setPaint(Color.blue);
	g2.fillRect(0, 0, getSize().width, getSize().height);

	g2.setPaint(Color.black);
	Random r = new Random();
	for (int i=0; i<57; i++){
	    int j = r.nextInt(getSize().width/4);
	    int k = r.nextInt(getSize().width);
	    int l = r.nextInt(getSize().width);
	    g2.drawOval(k, l, j, j);
	}

    }
    
    public void run() {
	try {
	    while(true) {
		repaint();
		Thread.sleep(1000);
	    }
	}
	catch (InterruptedException e){}
    }

}
