Antwort
public class mainclass {
private static int Lustig;
public static void main(String[] args) {
setLustig(60);
ZEICHENFENSTER.gibFenster();
for (int i = 0; i < 8; i++) {
for (int j = 0; j < 8; j++) {
if (((i % 2 == 0) && (j % 2 == 0)) || ((i % 2 != 0) && (j % 2 != 0))) {
ZEICHENFENSTER.gibFenster().fuelleRechteck(i * getLustig(), j * getLustig(), getLustig(), getLustig(), 2);
} else {
ZEICHENFENSTER.gibFenster().fuelleRechteck(i * getLustig(), j * getLustig(), getLustig(), getLustig(), 1);
}
}
}
}
public static int getLustig() {
return Lustig;
}
public static void setLustig(int lustig) {
Lustig = lustig;
}
}
So geht das, mein Kollege! :)
Btw du brauchst noch "Zeichenfenster". Kann man sich kostenlos runterladen.