séparation des fichiers java

This commit is contained in:
2024-04-27 15:46:35 +02:00
parent 82fa866cb8
commit ba02e03b80
2 changed files with 19 additions and 10 deletions

View File

@@ -10,9 +10,9 @@ public class SudokuGrid extends JFrame {
// Panneau pour la grille Sudoku
JPanel gridPanel = new JPanel();
gridPanel.setLayout(new GridLayout(GRID_SIZE, GRID_SIZE)); // Utiliser GridLayout
gridPanel.setBackground(new Color(0, 255, 0)); // Fond vert
gridPanel.setBackground(Color.green); // Fond vert
// Initialiser le grid
// Initialiser la grille
grid = new JTextField[GRID_SIZE][GRID_SIZE];
for (int i = 0; i < GRID_SIZE; i++) {
for (int j = 0; j < GRID_SIZE; j++) {
@@ -32,12 +32,5 @@ public class SudokuGrid extends JFrame {
getContentPane().add(buttonPanel, BorderLayout.EAST);
}
public static void main(String[] args) {
// afficage et création de la fenetre
SudokuGrid sudokuGrid = new SudokuGrid();
sudokuGrid.setSize(700,600);
sudokuGrid.setLocation(100, 100);
sudokuGrid.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
sudokuGrid.setVisible(true);
}
}