Why is my cell array offside?
2018-07-02 08:31:58
0
1
1242

for(int i = 0;i<4;i ) {//行数

for(int j = 0;i<3;j ) {//列数

ImageIcon icon = new ImageIcon("图片\\1_" (i*3 j 1) ".gif");

cell[i*3 j] = new Cell(icon);

cell[i*3 j].setLocation(j*150 20, i*150 20);

this.add(cell[i*3 j]);

}

}


reply all(1)

The second loop j is marked as i, which is an infinite loop.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!