24 lines
822 B
Java
24 lines
822 B
Java
|
import java.awt.event.*;
|
||
|
public class GestionModif implements ActionListener{
|
||
|
private String Reponses1="Quitter", Reponses2="Sauvegarder";
|
||
|
private String cet_event;
|
||
|
private boolean[][] cetteGrille;
|
||
|
private int cetteTaille;
|
||
|
private PrintGrille affiche;
|
||
|
|
||
|
public GestionModif(boolean[][] uneGrille, int uneTaille){
|
||
|
this.cetteGrille=uneGrille;
|
||
|
this.cetteTaille=uneTaille;
|
||
|
this.affiche = new PrintGrille(this.cetteGrille, this.cetteTaille);
|
||
|
}
|
||
|
|
||
|
public void actionPerformed(ActionEvent e){
|
||
|
this.cet_event=e.getActionCommand();
|
||
|
if (cet_event.equals(this.Reponses1)){
|
||
|
System.exit(1);
|
||
|
}
|
||
|
else if (cet_event.equals(this.Reponses2)){
|
||
|
this.affiche = new PrintGrille(this.cetteGrille, this.cetteTaille);
|
||
|
}
|
||
|
}
|
||
|
}
|