logo CodeStepByStep logo

Face

Language/Type: Java graphics DrawingPanel
Related Links:

Write a complete program in a class named Face that uses the DrawingPanel to draw the following figure:

Java DrawingPanel close maximize minimize
expected output
 
  • window size: 220 x 150 px
  • overall face circle: 100 px in diameter; top-left corner at (10, 30)
  • eyes: blue circles, 20 px in diameter; top-left at (30, 60) and (70, 60)
  • mouth: red line from (40, 100) to (80, 100)
Class: Write a complete Java class.

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.