Build and Run the Project to Test Functions of the FacultyFrame Form – Querying Data from Databases

6.3.7.8   Build and Run the Project to Test Functions of the FacultyFrame Form

Now we can build and run our project to test the functionalities of most FrameForm classes, includ-ing the LogInFrame Form, SelectionFrame Form and FacultyFrame Form.

Click on the Clean and Build Main Project button on the toolbar to build our proj-ect, and click on the Run Main Project button from the toolbar to run our project. Select OracleSelectFaculty-Package.LogInFrame as the starting class for our project if a MessageBox appears, and click on the OK button to run our project.

Enter the correct username and password, such as jhenry and test, to the LogInFrame to complete the login process. Select the Faculty Information from the SelectionFrame Form window to open the FacultyFrame Form window. Select the default faculty member Ying Bai from the Faculty Name combo box and the Java executeQuery Method from the Query Method combo box, and click on the Select button to get detailed information for this selected faculty member.

Immediately, detailed information about the selected faculty member is displayed in seven text fields with the faculty image, which is shown in Figure 6.39. You can try other methods, such as Java execute Method or Java Callable Method, with any other faculty members to perform different queries to test the function of this form.

Click on the Back and the Exit buttons to terminate our project to finish this test. Next let’s discuss how to query data from the Course Table in our sample database.

A completed project, OracleSelectFaculty, can be found in the Class DB Projects\ Chapter 6 folder in the Students folder on the CRC Press ftp site (refer to Figure 1.2 in Chapter 1).

FIGURE 6.38   The code for the Back button Click event handler.

FIGURE 6.39   A run result of the project.

Leave a Reply

Your email address will not be published. Required fields are marked *


© 2024 vogafloat, LLC ,About, Careers, Contact us,Cookies, Terms, Privacy