FlashCardsProject/build/project/src/jf/flashcards/address/MainApp.java
/**
	 * shows the AddNewCardToStack scene through a seperate window
	 * called from the FlashCardOverview view
	 * 
	 * @param stackTable, specifies the table that the card will be added to
	 * @return boolean
	 */
shows the AddNewCardToStack scene through a seperate window
called from the FlashCardOverview view

@param stackTable, specifies the table that the card will be added to
@return boolean
shows the AddNewCardToStack scene through a seperate window called from the FlashCardOverview view @param stackTable specifies the table that the card will be added to @return boolean
public boolean showAddNewCardToStack(String stackTable)
	{
		try {
			FXMLLoader loader = new FXMLLoader();
            loader.setLocation(MainApp.class.getResource("view/AddNewCardToStack.fxml"));
            AnchorPane page = (AnchorPane) loader.load();
            Stage dialogStage = new Stage();
            dialogStage.setTitle("Edit Person");
            dialogStage.initModality(Modality.WINDOW_MODAL);
            dialogStage.initOwner(primaryStage);
            Scene scene = new Scene(page);
            dialogStage.setScene(scene);
            AddCardToStackController controller = loader.getController();
            controller.setDialogStage(dialogStage);
            controller.setCurrentStackTable(stackTable);
            dialogStage.showAndWait();
            return controller.returnCancelClicked();
		}
		catch(IOException e)
		{
            e.printStackTrace();
            return false;
		}
	}
public boolean showAddNewCardToStack ( String stackTable ) { try { FXMLLoader loader = new FXMLLoader ( ) ; loader . setLocation ( MainApp . class . getResource ( "view/AddNewCardToStack.fxml" ) ) ; AnchorPane page = ( AnchorPane ) loader . load ( ) ; Stage dialogStage = new Stage ( ) ; dialogStage . setTitle ( "Edit Person" ) ; dialogStage . initModality ( Modality . WINDOW_MODAL ) ; dialogStage . initOwner ( primaryStage ) ; Scene scene = new Scene ( page ) ; dialogStage . setScene ( scene ) ; AddCardToStackController controller = loader . getController ( ) ; controller . setDialogStage ( dialogStage ) ; controller . setCurrentStackTable ( stackTable ) ; dialogStage . showAndWait ( ) ; return controller . returnCancelClicked ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return false ; } }
shows the AddNewCardToStack scene through a seperate window
 called from the FlashCardOverview view
shows the AddNewCardToStack scene through a seperate window called from the FlashCardOverview view
//sets the Stage and Scene //Allows the new Scene to be shown in a window  //create scene object and give it the page variable  //References the AddFlashCardStackController class  //so that it can be connected to the main class //waits until the dialogStage is closed