debut création d'une grille vide

This commit is contained in:
gallego 2024-04-15 00:50:25 +02:00
parent 4c0bdd73e7
commit aacfec7e6e
11 changed files with 10 additions and 2 deletions

BIN
Sudoku/grille.class Normal file

Binary file not shown.

BIN
Sudoku/main.class Normal file

Binary file not shown.

BIN
Sudoku/menu$1.class Normal file

Binary file not shown.

BIN
Sudoku/menu$2.class Normal file

Binary file not shown.

BIN
Sudoku/menu$3.class Normal file

Binary file not shown.

BIN
Sudoku/menu$4.class Normal file

Binary file not shown.

BIN
Sudoku/menu$5.class Normal file

Binary file not shown.

BIN
Sudoku/menu$6.class Normal file

Binary file not shown.

BIN
Sudoku/menu.class Normal file

Binary file not shown.

View File

@ -2,6 +2,7 @@ import javax.swing.*;
import java.awt.*; import java.awt.*;
import java.awt.event.*; import java.awt.event.*;
import java.io.*; import java.io.*;
import java.util.Arrays;
public class menu { public class menu {
@ -84,9 +85,16 @@ public class menu {
editer.addActionListener(new ActionListener(){ editer.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e4){ public void actionPerformed(ActionEvent e4){
if (cheminFichier != null){
int[][] grille_vide = new int[9][9];
Arrays.fill(grille_vide, 0);
fenetre.dispose();
grille.AfficherGrille(grille_vide, true);
}else{
fenetre.dispose(); fenetre.dispose();
grille.AfficherGrille(grille.ChargerGrille(cheminFichier), true); grille.AfficherGrille(grille.ChargerGrille(cheminFichier), true);
} }
}
}); });
lancer.addActionListener(new ActionListener() { lancer.addActionListener(new ActionListener() {

Binary file not shown.