Refer to Section 5.3.2, and build a similar Java Ant application named SumTwoNumbers with the following functions:

Question:

Refer to Section 5.3.2, and build a similar Java Ant application named SumTwoNumbers with the following functions:

a) Build a GUI by adding a JFrame Form with two TextFields, Num1Field and Num2Field; one Label, ResultLabel; and two buttons, CalculateButton and ExitButton.

b) Code the CalculateButton and ExitButtons’ ActionPerformed() event handlers to perform summing of two input integers, display the result on the ResultLabel and exit the project.

Data From Section 5.3.2:

The NetBeans IDE allows you to create and build different projects based on different categories by selecting the right template for your project and completing the remaining wizard steps. First let’s take care of creating a new Java with Ant project.
To create a new Java with Ant project under the Apache NetBeans IDE, go to the File|New Project menu item. A New Project wizard is displayed and shown in Figure 5.4.
Under the Javawith Ant category, the IDE contains the following standard project templates for Java desktop and Web applications:

• Java Application: Creates a new skeleton Java Standard Edition (SE) project with a main class • Java Class Library: Creates a skeleton Java class library without a main class • Java Project with Existing Sources: Creates a Java SE project based on your own Java sources • Java Modular Project: Creates a new Java SE Modular Application in a standard IDE project. Multiple modules can be added into the project as standard projects using an IDE-generated Ant building script to build, run and debug the whole project. Java module is a new feature in Java 9 via the JavaPlatform Module System (JPMS)
• Java Free-Form Project: The free-form templates enable you to use an existing Ant script for a project but require manual configuration

Figure 5.4:

image text in transcribed

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: