Hi all.
This runs fine on some emulators, but on sun's wtk21 emulator and on nokia 3650 all I get is a white screen.
Any ideia how to do it right.
A code snippet would help.
TIA.
public void paint(Graphics g) {
g.setColor(255,255,255);
g.fillRect(0, 0, canvas0.getWidth(), canvas0.getHeight());
int x = 0;
int y = 0;
for(int i=0;i< 12;i++){
for(int j=0;j<12;j++){
switch(nBoard[i][j]) {
case 1:
g.drawImage(_$Images$yellow_png,x, y, Graphics.LEFT| Graphics.TOP);
break;
case 2:
g.drawImage(_$Images$red_png,x, y, Graphics.LEFT| Graphics.TOP);
break;
case 3:
g.drawImage(_$Images$blue_png,x, y, Graphics.LEFT| Graphics.TOP);
break;
case 4:
g.drawImage(_$Images$purple_png,x, y, Graphics.LEFT| Graphics.TOP);
break;
case 5:
g.drawImage(_$Images$green_png,x, y, Graphics.LEFT| Graphics.TOP);
break;
}
x+=12;
}
y+=12;
x = 0;
}
}

Reply With Quote

