@Override
	public void actionPerformed(ActionEvent e) {
		if(e.getSource()==btnSauvegarder){
			JFileChooser fileChooser = new JFileChooser();
			fileChooser.setDialogTitle("Specify a file to save");   
			 
			int userSelection = fileChooser.showSaveDialog(this);
			 
			if (userSelection == JFileChooser.APPROVE_OPTION) {
			     File file = fileChooser.getSelectedFile();
			     if(!file.getAbsolutePath().toLowerCase().endsWith(".txt"))
			     {
			         file= new File(file.getAbsolutePath() + ".txt");
			     }
			    System.out.println("Save as file: " + file.getAbsolutePath());
				    	  controleur.SauvegarderModele(file);
				
			   
			}
		}
		else if(e.getSource()==btnSauvegarder_1){
			JFileChooser fileChooser = new JFileChooser();
			fileChooser.setDialogTitle("Specify a file to save");   
			 
			int userSelection = fileChooser.showSaveDialog(this);
			 
			if (userSelection == JFileChooser.APPROVE_OPTION) {
			     file = fileChooser.getSelectedFile();
			    System.out.println("Save as file: " + file.getAbsolutePath());
			    if(!file.getAbsolutePath().toLowerCase().endsWith(".gexf"))
			     {
			         file= new File(file.getAbsolutePath() + ".gexf");
			     }
			new Thread(new Runnable() {
			      public void run() {
				    	controleur.SauvegarderGrapheChaines(file);
			      }
			}).start();
			}
		}
		else if(e.getSource()==btnFichiers){
			JFileChooser fileChooser = new JFileChooser();
			fileChooser.setDialogTitle("Specify a file to save");   
			 
			int userSelection = fileChooser.showSaveDialog(this);
			 
			if (userSelection == JFileChooser.APPROVE_OPTION) {
			     file = fileChooser.getSelectedFile();
			    System.out.println("Save as file: " + file.getAbsolutePath());
			    	String chemin=file.getAbsolutePath();
			         file= new File(chemin + ".gexf");
			         file2= new File(chemin + ".txt");
			new Thread(new Runnable() {
			      public void run() {
				    	controleur.SauvegarderGrapheChaines(file);
				    	controleur.SauvegarderModele(file2);
			      }
			}).start();
			
		}
		}
	}