private void setPanelStage(int stage) {
		
		
		if(stage == 1) {
		
			/*add main buttons to the top of the panel*/
			frame.setLayout(new GridBagLayout());
			GridBagConstraints c = new GridBagConstraints();
			viewRecipies = viewRecipiesPanel.setViewRecipiesPanelDimensions();
			newRecipeButton();			       
			closeButton();
			homeButtonListeners();
			ComponentMover cm = new ComponentMover(frame, homeLabel);
			addGoButtonClickedListener();
			
			c.gridwidth = 2;
			c.gridx = 0;
			c.gridy = 0;
			c.anchor = GridBagConstraints.FIRST_LINE_START;
			frame.add(newRecipeLabel, c);
			c.gridx = 1;
			frame.add(homeLabel, c);
			c.anchor = GridBagConstraints.FIRST_LINE_END;	
			frame.add(closeLabel, c);			       
			
			/*add recipe selection panel to the frame*/
			if(selectedRecipes.isEmpty()) {
				selectRecipePanel.addSelectedRecipesToPanel(recipes);
			}
			else
				selectRecipePanel.addSelectedRecipesToPanel(selectedRecipes);
			
			addListenerLoop();
			selectRecipe = selectRecipePanel.setSelectRecipePanelDimensions();
			
			c.fill = GridBagConstraints.HORIZONTAL;
			c.anchor = GridBagConstraints.PAGE_START;
			c.gridwidth = 1;
			c.gridx = 0;
			c.gridy = 1;
			frame.add(selectRecipe, c);			
			/*add viewrecipies panel to the frame*/
			
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridx = 1;
			c.gridy = 1;
			frame.add(viewRecipies, c);
			/*refresh the panels and frame and place the layout*/
			frame.validate();
			frame.getContentPane().doLayout();
		}
		
		if(stage == 2) {
			/*fill out the top of the frame again for buttons like close etc*/
			frame.setLayout(new GridBagLayout());
			GridBagConstraints c = new GridBagConstraints();			
			newRecipeButton();			
			closeButton();
			c.gridwidth = 2;
			c.gridx = 0;
			c.gridy = 0;
			c.anchor = GridBagConstraints.FIRST_LINE_START;
			frame.add(newRecipeLabel, c);
			frame.add(homeLabel, c);
			c.anchor = GridBagConstraints.FIRST_LINE_END;	       
			frame.add(closeLabel, c);
			//frame.validate();			       
			 	
			/*adding the select recipe panel*/
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridwidth = 1;
			c.gridx = 0;
			c.gridy = 1;
			frame.add(selectRecipe, c);			

			/*adding the viewrecipies panel*/		
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridx = 1;
			c.gridy = 1;
			frame.add(viewRecipies, c); 			       

			/*add the editingredients panel*/
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridwidth = 2;
			c.gridx = 0;
			c.gridy = 2;
			frame.add(editIngredients, c);
			
			/*do the frame layout etc*/
			frame.getContentPane().doLayout();
		}
		
		if(stage == 3) {
			//add main buttons to the top of the panel
			frame.setLayout(new GridBagLayout());
			GridBagConstraints c = new GridBagConstraints();			
			newRecipeButton();			       
			closeButton();
			homeButtonListeners();
			c.gridwidth = 2;
			c.gridx = 0;
			c.gridy = 0;
			c.anchor = GridBagConstraints.FIRST_LINE_START;
			//frame.add(newRecipeLabel, c);
			frame.add(homeLabel, c);
			c.anchor = GridBagConstraints.FIRST_LINE_END;	
			frame.add(closeLabel, c);			       
			
			//add recipe selection panel to the frame
			selectRecipe = selectRecipePanel.setSelectRecipePanelDimensions();
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridwidth = 1;
			c.gridx = 0;
			c.gridy = 1;
			frame.add(selectRecipe, c);			
			//add viewrecipies panel to the frame
		
			addRecipe = addRecipePanel.setAddRecipePanelDimensions();
			c.fill = GridBagConstraints.HORIZONTAL;		
			c.gridx = 1;
			c.gridy = 1;
			frame.add(addRecipe, c);
			//refresh the panels and frame and place the layout
			addRecipeListener();
			frame.getContentPane().doLayout();
		}
	
	}