package GraphicsExamples;
import javax.swing.*; // gives us JFrame
import java.awt.*; // gives us colors

public class WindowClass extends JFrame{

	public WindowClass( String title ) {

		super( title );
		setSize( 700, 1000 );
		setLocation( 20, 20 );
		setBackground( Color.pink );
		setDefaultCloseOperation( EXIT_ON_CLOSE ); 
		setVisible( true );
		
	} // end constructor

	public void paint (Graphics g ) {
	
		int a;
		int x, y, w, h;
		
		for ( a=0; a<=500000; a=a+1 ) // auto-increments
		{
		x = cse115.utilities.Random.randomInteger(0, 700);
		y = cse115.utilities.Random.randomInteger(0, 1000);
		w = cse115.utilities.Random.randomInteger(1, 40);
		h = cse115.utilities.Random.randomInteger(1, 50);
		g.setColor( cse115.utilities.Random.randomColor() );
		g.fill3DRect(x, y, w, h, true);

		x = cse115.utilities.Random.randomInteger(0, 700);
		y = cse115.utilities.Random.randomInteger(0, 1000);
		w = cse115.utilities.Random.randomInteger(1, 40);
		h = cse115.utilities.Random.randomInteger(1, 50);
		g.setColor( cse115.utilities.Random.randomColor() );		
		g.fillOval(x, y, w, h);
		}
		
		
	}
	
	
	
} // end class

