private void jButtonAddCustomerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonAddCustomerActionPerformed
        //A lot of error handling, to prevent wrong information in the database.
        if ("".equals(Fnamefield.getText()) || "".equals(Snamefield.getText()) || "".equals(Countryfield.getText())
                || "".equals(Emailfield.getText()) || "".equals(Phonefield.getText()) || "".equals(Addressfield.getText())) {
            JOptionPane.showMessageDialog(rootPane, "One or more fields are left empty. Please make sure all fields are filled properly");
        } else {
            //Makes a new object of customer.
            con.createNewCustomer(Fnamefield.getText(), Snamefield.getText(), Countryfield.getText(), Emailfield.getText(),
                    Integer.parseInt(Phonefield.getText()), Addressfield.getText());
            //Saves the customer
            boolean status = con.saveCustomer();
            if (status) {
                Statuslabel.setText("Customer saved");
            } else {
                Statuslabel.setText("Customer could not be saved!");
            }
        }
    }//GEN-LAST:event_jButtonAddCustomerActionPerformed