private void newMealGoButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_newMealGoButtonActionPerformed

        if (newMealNameTextField.getText().length() > 0
                && newMealCaloriesTextField.getText().length() > 0
                && newMealProteinTextField.getText().length() > 0) {

            Controller controller = getController();

            try {
                controller.buildAndAddMeal(newMealNameTextField.getText(),
                        Double.parseDouble(newMealCaloriesTextField.getText()),
                        Double.parseDouble(newMealProteinTextField.getText()));
            } catch (NumberFormatException nfe) {
                System.out.println("NFE not caught by inputverifier");
            } catch (RuntimeException e) {
                JOptionPane.showMessageDialog(rootPane, "DATABASE ERROR: " + e.getMessage(),
                        "Error", JOptionPane.ERROR_MESSAGE);
            }

            newMealDialog.dispose();
            masterRefresh();
        } else {
            JOptionPane.showMessageDialog(rootPane, "Please complete every field",
                    "Error", JOptionPane.ERROR_MESSAGE);
        }
    }//GEN-LAST:event_newMealGoButtonActionPerformed