Objective: -use the JTextField and JButton classes; and -Add event listeners to JButton objects. Procedure: 1. Create a folder named LastName_FirstName (ex. Liam_Jimenez) in your local drive. 2. Create a new project named LabExer7B. Set the project location to your own folder. 3. Add another class named RunCheckerSwapper. 4. Create a program that has two (2) JTextField objects, two (2) JButton objects, and one (1) JLabel object. The first JButton will be used to determine whether the texts in two (2) JTextField objects are the same while the other

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter11: User Interfaces, Visual Basic For Applications (vba), And Collaboration Features
Section: Chapter Questions
Problem 12EYK
icon
Related questions
Question

Objective:

-use the JTextField and JButton classes; and

-Add event listeners to JButton objects.

Procedure:

1. Create a folder named LastName_FirstName (ex. Liam_Jimenez) in your local drive.

2. Create a new project named LabExer7B. Set the project location to your own folder.

3. Add another class named RunCheckerSwapper.

4. Create a program that has two (2) JTextField objects, two (2) JButton objects, and one (1) JLabel object. The first JButton will be used to determine whether the texts in two (2) JTextField objects are the same while the other JButton will be used to swap the texts. The JLabel will be used to display the result for the CHECK option. See the following screenshots for the program flow:

 

a. Before clicking the CHECK button (same texts)
x
Checker and Swapper
DORAEMON
CHECK
DORAEMON
SWAP
b. After clicking the CHECK button
Checker and Swapper
DORAEMON
CHECK
DORAEMON
SWAP
SAME
Transcribed Image Text:a. Before clicking the CHECK button (same texts) x Checker and Swapper DORAEMON CHECK DORAEMON SWAP b. After clicking the CHECK button Checker and Swapper DORAEMON CHECK DORAEMON SWAP SAME
c. Before clicking the CHECK button (different texts)
Checker and Swapper
DORAEMON
CHECK
PIKACHU
SWAP
d. After clicking CHECK button
Checker and Swapper
DORAEMON
CHECK
PIKACHU
SWAP
NOT THE SAME
e. Before clicking the SWAP button
Checker and Swapper
DORAEMON
PIKACHU
f. After clicking the SWAP button
Checker and Swapper
PIKACHU
DORAEMON
CHECK
SWAP
CHECK
SWAP
Transcribed Image Text:c. Before clicking the CHECK button (different texts) Checker and Swapper DORAEMON CHECK PIKACHU SWAP d. After clicking CHECK button Checker and Swapper DORAEMON CHECK PIKACHU SWAP NOT THE SAME e. Before clicking the SWAP button Checker and Swapper DORAEMON PIKACHU f. After clicking the SWAP button Checker and Swapper PIKACHU DORAEMON CHECK SWAP CHECK SWAP
Expert Solution
steps

Step by step

Solved in 6 steps with 5 images

Blurred answer
Knowledge Booster
Hyperlinks
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage