public Diver() { // Opens Constructor // Sets layout for Diver panel setLayout(new BorderLayout()); // Sets background color for // Diver panel setBackground(Color.white); // Initializes text fields for // diver information name = new JTextField("Enter Your Name"); street = new JTextField(); city = new JTextField (); statezip = new JTextField (); // Initializes text fields for // emergency information nname = new JTextField(); phone = new JTextField(); rel = new JTextField (); // Initializes labels for textfields lname = new JLabel("Name: "); lstreet = new JLabel("Street: "); lcity = new JLabel ("City: "); lstatezip = new JLabel("State & Zip Code: "); lnname = new JLabel("Name: "); lphone = new JLabel("Phone: "); lrel = new JLabel ("Relationship: "); // Initializes checkboxes with titles ow = new JCheckBox("Open Water", true); a = new JCheckBox("Advanced"); res = new JCheckBox("Recovery & Rescue"); un = new JCheckBox("Underwater Photography"); w = new JCheckBox("Wreck & Cave Diving"); // Initialize buttons and image enter = new JButton("Enter Diver Data"); edit = new JButton("Edit Diver Data"); seahorse = new JLabel("", new ImageIcon("images/2seahorses.jpg"), JLabel.CENTER); // Calls method to buid image panel, which // is defined outside of the constructor buildImagePanel(); // Calls method to buid address panel, which // is defined outside of the constructor buildAddressPanel(); // Calls method to buid emerg panel, which // is defined outside of the constructor buildEmergencyPanel(); // Calls method to buid training panel, which // is defined outside of the constructor buildTrainingPanel(); //The methods called above build the panels, then this // call to add adds each panel to the main panel's // border layout manager. add(jaddress, BorderLayout.NORTH); add(images, BorderLayout.CENTER); add(training, BorderLayout.EAST); add(emerg, BorderLayout.SOUTH); } // Ends constructor