Question: (Java) Modify class GUIApp (that we wrote in previous sections from this module) so that the window has two buttons, one marked Hi and one

(Java) Modify class GUIApp (that we wrote in previous sections from this module) so that the window has two buttons, one marked "Hi" and one marked "Bye".

For the new version of this application, the user has two choices: If the user enters her name and then clicks the "Hi" button, the program displays the message "Well hello there !". If the user enters her name and then clicks the "Bye" button, the program displays the message "Goodbye !"

The user is able to enter different names and click different buttons to see one of the two messages as many times as she wants. When the user clicks the close button on the window, the application exits.

In order to prove that you have a completed, working application, take a screen shot of the final window that contains the goodbye message on the JLabel output.

Hints:

-Start by getting the basic application working with one button, as described in the module. Do not try to modify a program that is not working yet.

-You will only be adding code to class GUIApp class Main will remain the same.

-Don't worry about the exact layout of the buttons, text entry boxes and labels on the window. Laying out components on a JFrame is very difficult and outside the scope of this class.

-Make sure that you adhere to all program guidelines from the Week 6 module.

-Don't forget to include the screenshot to prove that your program works.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!