SAE21_2022/GestionExporter.java

38 lines
1.2 KiB
Java
Raw Normal View History

import java.awt.event.*;
import javax.swing.*;
public class GestionExporter implements ActionListener{
private String Reponses1="Sauvegarder", Reponses2="Passer";
private String cet_event;
private boolean[][] cetteGrille;
private Cellules[][] grilleCellules;
private int cetteTaille;
private JFrame frameGrille;
private JFrame frameModif;
private JFrame framePopup;
public GestionExporter(boolean[][] uneGrille, Cellules[][] uneGrilleCell , int uneTaille, JFrame frameG, JFrame frameM, JFrame frameP){
this.cetteGrille=uneGrille;
this.cetteTaille=uneTaille;
this.grilleCellules=uneGrilleCell;
this.frameGrille = frameG;
this.frameModif = frameM;
this.framePopup = frameP;
}
public void actionPerformed(ActionEvent e){
this.cet_event=e.getActionCommand();
if (cet_event.equals(this.Reponses1)){
System.out.println("Sauvegardeeeeeeeeeee");
}
else if (cet_event.equals(this.Reponses2)){
this.frameGrille.dispose();
this.frameModif.dispose();
this.framePopup.dispose();
System.out.println("tout a été fermé");
}
}
}