Two-Part Assignment

655 Words3 Pages
------------------------------------------------- This is a two-part assignment. Part 1 Design, implement, test, and debug a program with a JFrame that allows the user to enter a series of contacts’ names, ages, e-mail addresses, and cell phone numbers, and creates a file from the entered data. Validate the age entry to ensure that it is numeric and between 0 and 120. Include information for three to five contacts. Part 2 Design, implement, test, and debug a program that reads the file you created by the list in Part 1 and displays the records in a JFrame. You may either display all entries in the list at once or display them one at a time; the user interface is up to you. Protect against not being able to open the file. Flowchart…show more content…
* *Part 1 * * Design, implement, test, and debug a program with a JFrame that allows the user to enter * a series of contacts’ names, ages, e-mail addresses, and cell phone numbers, and creates * a file from the entered data. Validate the age entry to ensure that it is numeric and * between 0 and 120. Include information for three to five contacts. * * Part 2 * * Design, implement, test, and debug a program that reads the file you created by the list * in Part 1 and displays the records in a JFrame. You may either display all entries in * the list at once or display them one at a time; the user interface is up to you. Protect * against not being able to open the file. * * ***************************************************************************************** */ import java.io.*; import java.util.Scanner; import javax.swing.*; import…show more content…
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // Allow to exit when the X is clicked. setLayout(new BorderLayout()); // Create a Border. buildContactsPanel(); //builds the Employee panel //setLayout(new FlowLayout(FlowLayout.LEFT)); // starts all Panels left justified add(ContactsPanel); setVisible(true); // displays the window } private void buildContactsPanel() { ContactsLabel = new JLabel("Please enter the following information: " + "names, ages, e-mail addresses, and cell phone numbers, " + "each followed by a
Open Document