int status = pdb.recipeExists(rc); if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STATUS_DIFFERS) {
int status = pdb.recipeExists(recipe); if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STATUS_DIFFERS) {
  private void deleteRecipeInNode(DefaultMutableTreeNode node) {    if (node == null) return;    model.removeNodeFromParent(node);    RecipeComponent rc = (RecipeComponent) node.getUserObject();    try {      PDbBase pdb = new PDbBase();      try {        int status = pdb.recipeExists(rc);        if (status == PDbBase.RECIPE_STATUS_EXISTS || status == PDbBase.RECIPE_STATUS_DIFFERS) {          int answer =            JOptionPane.showConfirmDialog(this,                                          "Delete recipe " +                                          rc.getRecipeName() +                                          " from database?",                                          "Delete Recipe",                                          JOptionPane.YES_NO_OPTION);          if (answer == JOptionPane.YES_OPTION) {            pdb.removeLibRecipe(rc);          }        }      } finally {        pdb.close();      }    } catch (Exception e) {      JOptionPane.showMessageDialog(this,                                    "An exception occurred deleting the recipe from the database",                                    "Error Writing Database",                                    JOptionPane.ERROR_MESSAGE);    }    recipeNames.remove(rc.getRecipeName());  }