
import javax.swing.*;
import java.awt.*;

class GraphicPanel extends JPanel
{
	int i=0;
	public GraphicPanel()
	{
		// Method of JComponent
		setBackground(Color.blue);
		setPreferredSize(new Dimension(100,100));
	}

	// Use g to draw on the JPanel, lookup java.awt.Graphics in
	// the javadoc to see more of what this can do for you!!
	
	public void paintComponent(Graphics g) 
	{
        super.paintComponent(g); //paint background

		// setBackground (Color.blue); 
		// Origin is at the top left of the applet 10 over, 20 down
		g.setColor(Color.white);
		g.drawString ("i="+i, 10, 10);
		g.drawOval(10,20,5,15);
		g.fillOval(30,30,25,25);
		g.draw3DRect(100,100,10,10,true);
		g.setColor (Color.green);
		g.fillRect(144,100, 25,25);
		
		i=i+1;
	}
}
