调试并发现错误...
我试过这样做:
public void paint(Graphics g) {
for (int i = 0; i < mapWidth; i++) {
g.drawRect (0 + i * (windowWidth/mapWidth), 0, windowWidth/mapWidth, windowHeight/mapHeight);
}
}
它什么也没画,但当我这样做时:
g.drawRect(0, 0, 64, 64);
它完美无缺?