public void updateButtons() {
        if ( cards[0][0].isShowing()){
            card1.setText(cards[0][0].getBack());
        }
        else { 
            card1.setText(Integer.toString(cards[0][0].getFront()));
        }
        
        if ( cards[0][1].isShowing()){
            card2.setText(cards[0][1].getBack());
        }
        else { 
            card2.setText(Integer.toString(cards[0][1].getFront()));
        } 
        
        if ( cards[0][2].isShowing()){
            card3.setText(cards[0][2].getBack());
        }
        else { 
            card3.setText(Integer.toString(cards[0][2].getFront()));
        }
        
         if ( cards[1][0].isShowing()){
            card4.setText(cards[1][0].getBack());
        }
        else { 
            card4.setText(Integer.toString(cards[1][0].getFront()));
        }
         
        if ( cards[1][1].isShowing()){
            card5.setText(cards[1][1].getBack());
        }
        else { 
            card5.setText(Integer.toString(cards[1][1].getFront()));
        }
        
        if ( cards[1][2].isShowing()){
            card6.setText(cards[1][2].getBack());
        }
        else { 
            card6.setText(Integer.toString(cards[1][2].getFront()));
        }
        
        if ( cards[2][0].isShowing()){
            card7.setText(cards[2][0].getBack());
        }
        else { 
            card7.setText(Integer.toString(cards[2][0].getFront()));
        }
        
        if ( cards[2][1].isShowing()){
            card8.setText(cards[2][1].getBack());
        }
        else { 
            card8.setText(Integer.toString(cards[2][1].getFront()));
        }
        
        if ( cards[2][2].isShowing()){
            card9.setText(cards[2][2].getBack());
        }
        else { 
            card9.setText(Integer.toString(cards[2][2].getFront()));
        }
    }