import java.awt.event.*; import javax.swing.*; public class Oui implements WindowListener{ private int a; public Oui(){ super(); this.a=0; } public void windowActivated(WindowEvent evenement){} // premier plan public void windowClosed(WindowEvent evenement){} // après fermeture public void windowClosing(WindowEvent evenement){} // avant fermeture public void windowDeactivated(WindowEvent evenement){} // arrière-plan public void windowDeiconified(WindowEvent evenement){} // restauration public void windowOpened(WindowEvent evenement){} public void windowIconified(WindowEvent e){ this.a=1; } public boolean checkVrai(){ if (this.a == 1){ return true; } else{ return false; } } }