import javax.swing.*;
import java.awt.*;

public class Smile2 extends JFrame {
    public void paint(Graphics g) {
	setBackground(new Color(110,200,130)); // just create some random color
	Color rectColor = Color.blue;
	
	// draw the face
	g.setColor(Color.yellow);
	g.fillOval(150,150,200,190);
	// draw the boundary of the face
	g.setColor(Color.black);
	g.drawOval(150,150,200,190);
	// draw the rectangle for the face
	g.setColor(rectColor);
	g.drawRect(150,150,200,190);
 	
	//draw the eyes
	g.setColor(Color.black);
	g.fillOval(195,220,10,10);
	g.fillOval(295,220,10,10);
	// draw the rectange for the eyes
	g.setColor(rectColor);
	g.drawRect(195,220,10,10);
	g.drawRect(295,220,10,10);
	
	//draw the month
	g.setColor(Color.black);
	g.drawArc(200,250,100,50,-10,-160);
	// draw the rectangle for the month
	g.setColor(rectColor);
	g.drawRect(200,250,100,50);
	
	//draw 2 red spots
	g.setColor(Color.red);
	g.fillOval(170, 265, 20,20);
	g.fillOval(310, 265, 20,20);	
	// draw the rectangle for the red spots
	g.setColor(rectColor);
	g.drawRect(170, 265, 20,20);
	g.drawRect(310, 265, 20,20);	
    }
    
    public static void main(String[] args) {
        Smile2 f = new Smile2();
	f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	f.setSize(500,500);
	f.setVisible(true);
    }
}
