SAE21_2022/GestionModif.java

32 lines
1.1 KiB
Java

import java.awt.event.*;
import javax.swing.*;
public class GestionModif implements ActionListener{
private String Reponses1="Quitter", Reponses2="Suivant";
private String cet_event;
private boolean[][] cetteGrille;
private Cellules[][] grilleCellules;
private int cetteTaille;
private JFrame cetteFrameGrille;
private JFrame cetteFrameModif;
public GestionModif(boolean[][] uneGrille, Cellules[][] uneGrilleCell, int uneTaille, JFrame frameGrille, JFrame frameModif){
this.cetteGrille=uneGrille;
this.cetteTaille=uneTaille;
this.grilleCellules=uneGrilleCell;
this.cetteFrameGrille = frameGrille;
this.cetteFrameModif = frameModif;
}
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)){
Exporter newExport = new Exporter(this.cetteGrille, this.grilleCellules, this.cetteTaille, this.cetteFrameGrille, this.cetteFrameModif);
}
}
}