fin création d'une grille vide
This commit is contained in:
parent
bb5488f3bb
commit
08e7104bcb
@ -25,10 +25,10 @@ public class grille extends JComponent{
|
||||
case_editable = new JTextField[9][9];
|
||||
for (int i = 0; i < 9; i++) {
|
||||
for (int j = 0; j < 9; j++) {
|
||||
if (grid_values[i][j] == 0){
|
||||
if (grille[i][j] == 0){
|
||||
case_editable[i][j] = new JTextField("", 1);
|
||||
}else{
|
||||
case_editable[i][j] = new JTextField(String.valueOf(grid_values[i][j]), 1);
|
||||
case_editable[i][j] = new JTextField(String.valueOf(grille[i][j]), 1);
|
||||
}
|
||||
case_editable[i][j].setBorder(new LineBorder(Color.BLACK, 5));
|
||||
case_editable[i][j].setFont(new Font("Arial", Font.PLAIN, 30));
|
||||
|
@ -85,9 +85,16 @@ public class menu {
|
||||
|
||||
editer.addActionListener(new ActionListener(){
|
||||
public void actionPerformed(ActionEvent e4){
|
||||
if (cheminFichier != null){
|
||||
int[][] grille_vide = new int[9][9];
|
||||
Arrays.fill(grille_vide, 0);
|
||||
if (cheminFichier == null){
|
||||
int[][] grille_vide = null;
|
||||
grille_vide = new int[9][9];
|
||||
|
||||
for (int i = 0; i < 9; i++) {
|
||||
for (int j = 0; j < 9 ; j++ ) {
|
||||
grille_vide[i][j] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
fenetre.dispose();
|
||||
grille.AfficherGrille(grille_vide, true);
|
||||
}else{
|
||||
@ -121,7 +128,7 @@ public class menu {
|
||||
|
||||
manuel.addActionListener(new ActionListener() {
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
public void actionPerformed(ActionEvent e1) {
|
||||
ResolutionManuel = true;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user