Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi, I need help with a java gui problem. For this assignment, you will update your ETracker class from the third module assignment and connect

Hi, I need help with a java gui problem.

For this assignment, you will update your ETracker class from the third module assignment and connect it to a GUI class, EFrame. You will also add a few new application features to ETracker.

1.GUI conversion:

a.The ETracker class will have an EFrame object as a data field, as specified in 2)

b.Commands will be entered through the GUI, instead of the console, and two new commands will be included

c.The ETracker will otherwise be the same as in the third module assignment, containing & managing an array of Employee objects

2.EFrame:

a.The EFrame object will contain two panels, in a single-column GridLayout. The upper panel will hold buttons & text boxes for entering inputs. The lower panel will hold a text area for displaying any Employee records or other output

b.You will need a separate text box for each Employee field: firstName, lastName, and id. The text boxes should be labeled sensibly & appropriately

c.You will need separate buttons for the commands in ETracker: create, list, get first, get last, and exit.

d.Clicking the buttons from c) will read the relevant text boxes - for example, create will read whatever text is present for firstName & lastName but ignore the id text box.

e.Command results: Each of these successfully executed command will clear the text boxes in the upper panel and display output in the lower panel's text area

i.create - will display a confirmation message in the lower panel, indicating the new Employee's id, lastName, and firstName

ii.list - displays the entire array of Employees, with one {id, lastName, firstName} set per line

iii.get first/last - displays the matching set of Employees, with one {id, lastName, firstName} set per line

iv.exit will simply exit the application and requires no confirmation message

3.New commands: Each of the following new commands will also require its own button

a.show - in the lower panel, displays the Employee record matching an input id value

b.< and > - displays the next (>) or previous (<) Employee from the current id value. If no id value is currently selected, (>) will show the lowest id value in the array and (<) will show the highest value in the array. If the array is empty (its length is zero), clicking these buttons will do nothing. These buttons will also update the upper panel text boxes as necessary - they should match any Employee record shown in the lower panel.

c.update: for the Employee with the currently selected id (read from the text box), updates its firstName and lastName to match the text in their corresponding text boxes

Additional Constraints

The program should be implemented as a single file holding the public class App1. The application should shut down when the window is closed out.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Financial management theory and practice

Authors: Eugene F. Brigham and Michael C. Ehrhardt

12th Edition

978-0030243998, 30243998, 324422695, 978-0324422696

Students also viewed these Programming questions