import javax.swing.*; import java.awt.event.*; public class Reset implements ActionListener { private int[][] grid; private Enter enterPanel; public Reset(int[][] grid, Enter enterPanel) { this.grid = grid; this.enterPanel = enterPanel; } @Override public void actionPerformed(ActionEvent e) { // RĂ©initialiser la grille en copiant la grille initiale for (int i = 0; i < grid.length; i++) { System.arraycopy(enterPanel.getInitialGrid()[i], 0, grid[i], 0, grid[i].length); } // Redessiner le panneau enterPanel.repaint(); } }