33 lines
926 B
Java
33 lines
926 B
Java
|
/*public class Case {
|
||
|
// Réalisation du damier et ajout d'éléments graphiques
|
||
|
for (int currentLine=0; currentLine<lignes; currentLine++){
|
||
|
for(int currentCase = 0; currentCase < colonnes; currentCase++){
|
||
|
if (currentLine%2==0){
|
||
|
if (currentCase%2==0){
|
||
|
JPanel dark = new JPanel();
|
||
|
dark.setSize(caseSize);
|
||
|
dark.setBackground(gray2);
|
||
|
grille.add(dark);
|
||
|
} else {
|
||
|
JPanel light = new JPanel();
|
||
|
light.setSize(caseSize);
|
||
|
light.setBackground(gray1);
|
||
|
grille.add(light);
|
||
|
}
|
||
|
} else {
|
||
|
if (currentCase%2==0){
|
||
|
JPanel light = new JPanel();
|
||
|
light.setSize(caseSize);
|
||
|
light.setBackground(gray1);
|
||
|
grille.add(light);
|
||
|
} else {
|
||
|
JPanel dark = new JPanel();
|
||
|
dark.setSize(caseSize);
|
||
|
dark.setBackground(gray2);
|
||
|
grille.add(dark);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}*/
|