logo CodeStepByStep logo

SmileyFace

Language/Type: Java graphics parameters DrawingPanel
Related Links:

Suppose you have an existing program called SmileyFace that uses the DrawingPanel to draw a face figure. (The existing program's code is shown in the code editor on this page.)

Modify the program to draw the following graphical output. Do so by writing a parameterized static method that draws a face at different positions. The window size should be changed to 320 x 180 pixels, and the two faces' top-left corners are at (10, 30) and (150, 50).

Java DrawingPanel close maximize minimize
expected output
 

(You don't need to include any import statements at the top of your program.)

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.