private void gameOver(String message) throws BoardErrorException, ButtonsNotMadeException, ButtonCanNotBeClickedException, 
	                                             WinnerErrorException, CouldNotPlayAgainException,NoCancelOption{

		JOptionPane.showMessageDialog(null, message, "Game Over", JOptionPane.YES_NO_OPTION); // gives a popup window at the end of the game 

		int playAgain = JOptionPane.showConfirmDialog(null, "Do you want to play another game?", 
				"Play Again", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
		//going to ask user if he wants to play agin, while still seeing the board 

		if (playAgain == JOptionPane.OK_OPTION) { 

			frame.dispose(); // going to dispose of our frame// if user hit ok 
			GUI.playAgain(); // play the game again

		}
	    if(playAgain == JOptionPane.CANCEL_OPTION){
			secondPlayAgin(); // give user second chance 
		}	
		
	}