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
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:

*Figure a: This image shows the user interface before the "CHECK" button is clicked. Both input fields contain identical text ("DORAEMON").*
**Step 2: After Clicking the 'CHECK' Button**
- **Screenshot Description**:
- The interface remains the same with both input fields containing "DORAEMON".
- After clicking the "CHECK" button, the program displays the text "SAME" in the output area.

*Figure b: This image shows the user interface after the "CHECK" button is clicked. Since the texts in both input fields are identical, the program displays "SAME".*
#### Summary
This program is a helpful tool for quickly comparing and swapping text in two input fields. The visual demonstrations (Figures a and b) show how to use the "CHECK" button to verify if the texts are identical, and the program responds by displaying "SAME" when they are.](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F8e184305-fc76-45fc-808b-0a24c2a37dcd%2F3be38825-815c-41da-8979-e2c7d2f7753e%2Fs81aolo_processed.png&w=3840&q=75)


Step by step
Solved in 6 steps with 5 images









