DEV_BUT1/DEV2.1/CTRLBLANC/Exo5/Fermeture.java
2023-04-04 14:03:16 +02:00

22 lines
456 B
Java

import java.awt.*;
import javax.swing.*;
public class Fermeture{
public static void main(String[] args) {
JFrame fenetre = new JFrame();
fenetre.setSize(800, 800);
Oui yeet = new Oui();
while(yeet.checkVrai()!= true){
fenetre.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
fenetre.setVisible(true);
}
fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
fenetre.addWindowListener(yeet);
fenetre.setVisible(true);
}
}