import javax.swing.*; import java.awt.*; public class FenetreJeu extends JFrame { private Grille grille; public FenetreJeu(Grille g) { super("Démineur - Partie en cours"); this.grille = g; this.setSize(600, 600); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setLayout(new BorderLayout()); JPanel panneauGrille = new JPanel(); panneauGrille.setLayout(new GridLayout(10, 10)); for (int i = 0; i < 10; i++) { for (int j = 0; j < 10; j++) { JButton boutonCase = new JButton("?"); panneauGrille.add(boutonCase); } } this.add(panneauGrille, BorderLayout.CENTER); } }