FlashCardsProject/build/build/src/jf/flashcards/address/view/FlashCardOverviewController.java
/**
     * 
     * gives functionality to the previous card button
     * sets the labels to the previous card
     * 
     */
gives functionality to the previous card button
sets the labels to the previous card
gives functionality to the previous card button sets the labels to the previous card
@FXML
    private void previousCard() {
    	if(!currentFlashCardStack.isEmpty())
    	{
    		if((listIndex -1) < 0 )
    		{
    			listIndex = currentFlashCardStack.size()-1;
    		}
    		else
    		{
    			listIndex = listIndex - 1;
    		}
    		frontCardLabel.setText(currentFlashCardStack.get(listIndex).getFront());
    		frontShowing = true;
    		frontBackLabel.setText("Front");
    	}
    }
@ FXML private void previousCard ( ) { if ( ! currentFlashCardStack . isEmpty ( ) ) { if ( ( listIndex - 1 ) < 0 ) { listIndex = currentFlashCardStack . size ( ) - 1 ; } else { listIndex = listIndex - 1 ; } frontCardLabel . setText ( currentFlashCardStack . get ( listIndex ) . getFront ( ) ) ; frontShowing = true ; frontBackLabel . setText ( "Front" ) ; } }
gives functionality to the previous card button
 sets the labels to the previous card
gives functionality to the previous card button sets the labels to the previous card
//sets the listIndex to the back of the list if the listIndex is less than 0 //sets the listIndex to the previous index  //sets the card labels 