private void editMealGoButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_editMealGoButtonActionPerformed
        if (editMealNameTextField.getText().length() > 0
                && editMealCaloriesTextField.getText().length() > 0
                && editMealProteinTextField.getText().length() > 0) {

            int selectedRowNum = allMealsTable.getSelectedRow();
            Object foundNumber = secondTableModel.getValueAt(selectedRowNum, 2);
            long chosenId = Long.parseLong(foundNumber.toString());

            Controller controller = getController();

            try {
                controller.editMeal(chosenId,
                        editMealNameTextField.getText(),
                        Double.parseDouble(editMealCaloriesTextField.getText()),
                        Double.parseDouble(editMealProteinTextField.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);
            }

            editMealDialog.dispose();
            masterRefresh();
        } else {
            JOptionPane.showMessageDialog(rootPane, "Please complete every field",
                    "Error", JOptionPane.ERROR_MESSAGE);
        }

    }//GEN-LAST:event_editMealGoButtonActionPerformed