Question: For this assignment, we will convert the text-based Controller2 application from the previous assignment to a GUI application. The class name should be Controller3, an
For this assignment, we will convert the text-based Controller2 application from the previous assignment to a GUI application. The class name should be Controller3, an underscore, and your NetID run together; for example, if your NetID is abcde6, your class name would be Controller3_abcde6. Likewise, Employee2 should be renamed Employee3. The new design requirements are:
1) Contoller3 should extend JFrame and implement the ActionListener interface. Each Controller3 object should have, in addition to the prior data members:
a) One JPanel, added directly to the Controller3 object, and containing the JPanels in 1b) and 1c)
b) One one JPanel, a set of JButtons, one for each of the functions in the previous assignment: add, delete, update employee, update field, read, and exit with appropriate labels
c) On a second JPanel:
i) a JTextField object for user input. The JTextField should be cleared (use setText("") to clear it) whenever a new input is needed
ii) a JTextArea object for output. The JTextArea should be cleared (again, use setText("")) whenever a new command is processed (i.e., a JButton is pressed). Otherwise, successive lines of text should use its append method.
2) The GUI should respond to clicked JButtons as if the user had entered the same text command in the previous assignment. For example, if the user presses the Delete JButton, the program should display a prompt asking the index to delete in the output JTextArea, which the user enters in the input JTextField,
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
