Write a gui program that maintains a set of contacts each


Write a GUI program that maintains a set of contacts. Each contact has name, address, and a list of phone numbers. This contacts should be be stored in a HashMap. When the program starts up and the empty map will be treated initially. Then the program should present the user with a main window with buttons that will allow the user to add, search, and delete records.

Also, it will allow the user to navigate from record to record. That is, allow the user to locate the first, next, previous, and last records. The "current record" in the list is the record that was most recently referenced (added or navigation). At program start-up, the current record is undefined.

Create the method that will allow the user to add new record. If the user clicks 'Add' button, the program should show a dialog for a name, address, and telephone number. Upon receipt of this information, a new record is added to the list.

If the user clicks 'delete', the program should delete the current entry from the list. (If the current record is undefined, the program should issue an error message.) After a record is deleted, the current record is undefined. Create the method that will allow the user to delete the current record.

If the user clicks 'search', the program should prompt for a name to be searched for. It then should search through the list for a record with a matching name and display the name, address and telephone number to the list box. Write the code for the methods to locate and display the first, previous, next, and last record in the list. Use care so that the end user cannot locate the next record when the last record is the current record. And display the name, address and telephone number in a list box on the main window.

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a gui program that maintains a set of contacts each
Reference No:- TGS0792254

Now Priced at $40 (50% Discount)

Recommended (92%)

Rated (4.4/5)