// ****************************************************************
//   Shapes.java
//
//   The program will draw two filled rectangles and a
//   filled oval.
// ****************************************************************

import javax.swing.JApplet;
import java.awt.*;

public class Shapes extends JApplet
{
    public void paint (Graphics page)
    {
		// Declare size constants
		final int MAX_SIZE = 300;
		final int PAGE_WIDTH = 600;
		final int PAGE_HEIGHT = 400;

		// Declare variables
		int x, y;    // x and y coordinates of upper left-corner of each shape
		int width, height; // width and height of each shape 

		// Set the background color
		setBackground (Color.yellow);

		// Set the color for the next shape to be drawn
		page.setColor (Color.blue);

		// Assign the corner point and width and height
		x = 50;
		y = 50;
		width  = 250 ;
		height = 150 ;

		// Draw the rectangle
		page.fillRect(x, y, width, height);

		// Rectabgle #2
		page.setColor (Color.red);
		x = 100;
		y = 100;
		width  = 40 ;
		height = 40 ;
		page.fillRect(x, y, width, height);
		
		// Rectabgle #3
		page.setColor (Color.green);
		x = 200;
		y = 100;
		width  = 200 ;
		height = 200 ;
		page.fillOval(x, y, width, height);
		
		// Rectabgle #4
		page.setColor (Color.white);
		x = 400;
		y = 50;
		width  = 100 ;
		height = 50 ;
		page.fillOval(x, y, width, height);
		

    }
}
