suite du traville avec grille et cas
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user