SAE21_2022/Fenetre.java

17 lines
433 B
Java

import javax.swing.*;
public class Fenetre{
protected JFrame fenetre;
public Fenetre() {
this.fenetre = new JFrame("Creation du programme");
this.fenetre.setSize(400, 500);
this.fenetre.setLocationRelativeTo(null); // centre la fenêtre sur l'écran
this.fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
public void closeFrame() {
this.fenetre.dispose();
}
}