Advertisement
mcnealk

Exercise3

Oct 9th, 2014
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1.  
  2. /**
  3. * Write a description of class Exercise3 here.
  4. *
  5. * @author Kailey McNeal
  6. * @version 10-9-14
  7. * Exercise 3 p224
  8. */
  9. import java.awt.*;
  10. import java.applet.*;
  11. public class Face extends Applet
  12. {
  13. public void paint (Graphics g)
  14. {
  15. g.setColor(Color.black);
  16. g.drawOval(10,30,100,100); //face outline
  17. g.setColor(Color.blue);
  18. g.fillOval(30,60,20,20); //eyes
  19. g.fillOval(70,60,20,20);
  20. g.setColor(Color.red); //mouth
  21. g.drawLine(40,100,80,100);
  22. g.setColor(Color.black);
  23. g.drawOval(150,50,100,100); //face outline
  24. g.setColor(Color.blue);
  25. g.fillOval(170,80,20,20); //eyes
  26. g.fillOval(210,80,20,20);
  27. g.setColor(Color.red); //mouth
  28. g.drawLine(180,120,220,120);
  29. }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement