private void addRecipeActionPerformed(MouseEvent evt) {//GEN-FIRST:event_addAllActionPerformed
        
        newRecipe = new Recipe();
        if(!recipeTitle.getText().isEmpty()) {
        newRecipe.setTitle(recipeTitle.getText());
        }
        else {
        	create = false;
        }
        if(curIngredient.size() > 0 && curAmount.size() > 0) {
        	for(int i = 0;i<curIngredient.size();i++){
        		newRecipe.setIngredients(curIngredient.get(i));
        		newRecipe.setAmount(curAmount.get(i));
        	}
        }
        else {
        	create = false;
        }
        if(!recipeInstructions.getText().isEmpty()) {
        newRecipe.setInstructions(recipeInstructions.getText());
        }
        else {
        	create = false;
        }
        
        if(!(mealCatagory.getSelectedIndex() == 0)) {
        	newRecipe.setCategory(categoryArray[mealCatagory.getSelectedIndex()]);
        }
        else {
        	create = false;
        }
        
        if(!(mainIngredient.getSelectedIndex() == 0)) {
        	newRecipe.setMainIngredient(mainIngredientArray[mainIngredient.getSelectedIndex()]);
        }
        else {
        	create = false;
        }
        if(!(alternateIngredientsInstructions.getText().isEmpty())) {
        	newRecipe.setAlternateIngredients(alternateIngredientsInstructions.getText());
        }
        else {
        	create = false;
        }
        if(!(prepTimeField.getText().isEmpty())) {
        	newRecipe.setPrepTime(prepTimeField.getText());
        }
        else {
        	create = false;
        }
        
        newRecipe.setImage(imagePath.getText());
   
        recipeTitle.setText("");
        ingredient.setText("");
        amount.setText("");
        listIngredients.setText("");
        recipeInstructions.setText("");
        mealCatagory.setSelectedIndex(0);
        mainIngredient.setSelectedIndex(0);
        alternateIngredientsInstructions.setText("");
        prepTimeField.setText("");
        actualPanel.removeAll();
        curIngredient.clear();
        curAmount.clear();
        initComponents();
        count = 1;
       
    }//GEN-LAST:event_addAllActionPerformed