Question
Program1 (25 points): Revise Listing 35.2, CopyFileToTable.java, to always copy the data from a text file named staff to staff table in test database, as
Program1 (25 points): Revise Listing 35.2, CopyFileToTable.java, to always copy the data from a text file named staff to staff table in test database, as shown in the following figures. (Note: for the instructions how to create staff table in test database in MySQL (if you have not already created that), please refer to Assignment#6 document).
a) When the user clicks on the View File button, the contents in the staff file will be displayed in the text area as in the following figure: (nothing needs to be changed in listing 35.2 for this point). When you type the directory of the staff file, dont forget to put the file name with the extension (staff.txt) as shown in the figure
b) The user needs to type the username INFO211 and password java2 Then, when the copy button is clicked, two things need to be happening: 1) the content displayed in the text area should be copied to staff table in test database. 2) the text area contents should be cleared as in the following figure:
c) When the view button is clicked, all contents in staff table should be retrieved and displayed in the text area as in the following figure
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started