Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Write a description of class Exercise3 here.
- *
- * @author Kailey McNeal
- * @version 10-9-14
- * Exercise 3 p224
- */
- import java.awt.*;
- import java.applet.*;
- public class Face extends Applet
- {
- public void paint (Graphics g)
- {
- g.setColor(Color.black);
- g.drawOval(10,30,100,100); //face outline
- g.setColor(Color.blue);
- g.fillOval(30,60,20,20); //eyes
- g.fillOval(70,60,20,20);
- g.setColor(Color.red); //mouth
- g.drawLine(40,100,80,100);
- g.setColor(Color.black);
- g.drawOval(150,50,100,100); //face outline
- g.setColor(Color.blue);
- g.fillOval(170,80,20,20); //eyes
- g.fillOval(210,80,20,20);
- g.setColor(Color.red); //mouth
- g.drawLine(180,120,220,120);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement