@Override
                            public void run() 
                            {
                                //
                                Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
                                //
                                Configuration dialog = new Configuration(new javax.swing.JFrame(), true);
                                //
                                dialog.setLocation((dim.width-dialog.getContentPane().getWidth())/2, (dim.height-dialog.getContentPane().getHeight())/2);
                                //
                                dialog.addWindowListener(new java.awt.event.WindowAdapter() 
                                {
                                    //
                                });
                                //
                                
                                //
                                Element configurationFileNameElement = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element port_forward_distance_to_starboard_forward_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_ocean_surface_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_forward_distance_to_starboard_aft_element = (Element) configurationFile.item(0);
                                //
                                Element starboard_aft_distance_to_port_aft_element = (Element) configurationFile.item(0);
                                //
                                Element port_aft_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element alongship_distance_to_port_forward_element = (Element) configurationFile.item(0);
                                //
                                Element distance_from_center_line_element = (Element) configurationFile.item(0);
                                //
                                Element transducer_depth_element = (Element) configurationFile.item(0);
                                //
                                Element depth_of_echosounder_view_centroid_element = (Element) configurationFile.item(0);
                                //
                                Element vessel_width_element = (Element) configurationFile.item(0);
                                
                                Configuration.port_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_forward_checkbox.setSelected(true);
                                
                                Configuration.starboard_aft_checkbox.setSelected(true);
                                                           
                                Configuration.port_aft_checkbox.setSelected(true);
                                //
                                Configuration.portForwardHeightFromOceanTextfield.setText(port_forward_distance_to_ocean_surface_element.getElementsByTagName("port_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardForwardHeightFromOceanTextfield.setText(starboard_forward_distance_to_ocean_surface_element.getElementsByTagName("starboard_forward_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.starboardAftHeightFromOceanTextfield.setText(starboard_aft_distance_to_ocean_surface_element.getElementsByTagName("starboard_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.portMiddleHeightFromOceanTextfield.setText(port_aft_distance_to_ocean_surface_element.getElementsByTagName("port_aft_distance_to_ocean_surface").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.firstRelativeDistanceInputTextfield.setText(port_forward_distance_to_starboard_forward_element.getElementsByTagName("port_forward_distance_to_starboard_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.secondRelativeDistanceInputTextfield.setText(starboard_forward_distance_to_starboard_aft_element.getElementsByTagName("starboard_forward_distance_to_starboard_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.thirdRelativeDistanceInputTextfield.setText(starboard_aft_distance_to_port_aft_element.getElementsByTagName("starboard_aft_distance_to_port_aft").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.fourthRelativeDistanceInputTextfield.setText(port_aft_distance_to_port_forward_element.getElementsByTagName("port_aft_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerDepthInputTextfield.setText(transducer_depth_element.getElementsByTagName("transducer_depth").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.targetSphereDepthInputTextfield.setText(depth_of_echosounder_view_centroid_element.getElementsByTagName("depth_of_echosounder_view_centroid").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.alongShipInputTextfield.setText(alongship_distance_to_port_forward_element.getElementsByTagName("alongship_distance_to_port_forward").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.transducerToCenterlineDistanceInputTextfield.setText(distance_from_center_line_element.getElementsByTagName("distance_from_center_line").item(0).getTextContent().split("\"")[1]);
                                //
                                Configuration.vesselWidthInputTextfield.setText(vessel_width_element.getElementsByTagName("vessel_width").item(0).getTextContent().split("\"")[1]);
                                //configurationFileNameElement
                                Configuration.fileNameInputTextfield.setText(configurationFileNameElement.getElementsByTagName("configurationFileName").item(0).getTextContent().split("\"")[1]);
                                
                                //Enables the relevent fields for the chosen vessel configuration.
                                Configuration.vesselConfigurationSetup();
                                //Enables the height from the ocean input fields if the corresponding downrigger location is chosen.
                                Configuration.OceanHeightTextfieldEnablerSwitch();
                                //
                                dialog.setTitle("Edit Vessel Configuration File");
                                //
                                dialog.setVisible(true);
                            }