public static void confirmExit (final JFrame fen){
		fen.addWindowListener(new WindowAdapter(){
			public void windowClosing(WindowEvent e){
				int reponse = JOptionPane.showConfirmDialog(fen,
						"Voulez-allez quitter l'application, Voulez-vous enregistrer",
						"Confirmation",
						JOptionPane.YES_NO_OPTION,
						JOptionPane.QUESTION_MESSAGE);
				if (reponse==JOptionPane.YES_OPTION){
					Dialogue.serialiserPartie(p, "Partie.txt"); 
					fen.dispose();
					fen.setDefaultCloseOperation(EXIT_ON_CLOSE);
				}
				if (reponse==JOptionPane.NO_OPTION){
					fen.setDefaultCloseOperation(EXIT_ON_CLOSE);
				}
			}
		});	
	}