Objective: The objective of this project is to practice using files of objects and gain more experiences in developing interactive GUI using Java Swing and AWT toolkits.
In this assignment, you are to design a Java program called address book to maintain a binary file of contacts. A contact record in the file should include the following information:
. First Name, a string of characters
. Last Name, a string of characters
. Email address, a string of characters
. Address, a string of characters
. Phone number, a string of characters
Your program should allow it’s user to do the following:
1. Create an address book.
2. Add contacts
3. Search contacts (optional)
4. Sort contacts (optional)
5. View/Delete contacts
6. Load contacts
7. Backup contacts
User interface requirement:
Your program should have a GUI closely similar to the following.
Programming hints about JLabel, JTable and JScrollPane:
1. To change the font size of a JLabel.
new JLabel(“<html<font size=5<bJLabel text</b</html”);
2. Create a JScrollPane and add it to the center of the contentPane of a frame.
scrollPane = new JScrollPane();
3. Before display contacts.
a. Create a JTable.
JTable abtable = new JTable(data,columnName);
b. Use the JTable to create a temporary JScrollPane.
JScrollPane tmp = new JScrollPane(abtable);
c. Get the viewport from the temporary JScrollPane and add it to the original JScrollPane.