protected void submitData(){
        if (isComplete()){
            String name = nameField.getText();
            float magneticHeading = Float.parseFloat(magneticHeadingField.getText());
            //float altitude = Float.parseFloat(altitudeField.getText()) / UnitConversionRate.convertDistanceUnitIndexToFactor(runwayAltitudeUnitsID);

            String parentAirfield = "";
            String parentId = "";
            try{
                parentAirfield = objectSet.getCurrentAirfield().getDesignator();
                parentId = objectSet.getCurrentAirfield().getId();
            }catch (Exception e){
                
            }
            

            Runway newRunway = new Runway(name, magneticHeading, parentAirfield, 0, "");
            newRunway.setId(currentRunway.getId());
            newRunway.setParentId(parentId);
            try{
                objectSet.setCurrentRunway(newRunway);
                Object[] options = {"One-time Launch", "Save to Database"};
                int choice = JOptionPane.showOptionDialog(rootPane, "Do you want to use this Runway for a one-time launch or save it to the database?",
                    "", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, options, options[0]);
                System.out.println(choice);
                if (choice == 0){
                    parent.update("2");
                    this.dispose();
                }
                else
                {
                    if (isEditEntry){
                        DatabaseEntryEdit.UpdateEntry(newRunway);
                    }
                    else{
                        Random randomId = new Random();
                        newRunway.setId(String.valueOf(randomId.nextInt(100000000)));
                        while (DatabaseEntryIdCheck.IdCheck(newRunway)){
                            newRunway.setId(String.valueOf(randomId.nextInt(100000000)));
                        }
                        DatabaseUtilities.DatabaseDataObjectUtilities.addRunwayToDB(newRunway);
                    }
                    parent.update("2");
                    this.dispose();
                }
            }catch(SQLException e1) {
                if(e1.getErrorCode() == 30000){
                    System.out.println(e1.getMessage());
                    JOptionPane.showMessageDialog(rootPane, "Sorry, but the runway " + newRunway.toString() + " already exists in the database", "Error", JOptionPane.INFORMATION_MESSAGE);

                }
            }catch (ClassNotFoundException e2) {
                JOptionPane.showMessageDialog(rootPane, "Error: No access to database currently. Please try again later.", "Error", JOptionPane.INFORMATION_MESSAGE);
            } catch (Exception e3) {

            }
        }
    }