Question: a. Write an application that extends JPanel and displays a yellow smiling face on the screen. Save the file as JSmileFacePanel.java. b. Add a JButton

a. Write an application that extends JPanel and displays a yellow smiling face on the screen. Save the file as JSmileFacePanel.java.

b. Add a JButton to the JSmileFacePanel program so the smile changes to a frown and then back to a smile each time the user clicks the JButton. Save the file as JSmileFacePanel2.java.

Step by Step Solution

3.31 Rating (160 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a import javaxswing import javaawt import javaawtColor import javaawtevent public class JSmileFacePa... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Java Programming 8th Questions!