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]);
}
The second loop j is marked as i, which is an infinite loop.
The second loop j is marked as i, which is an infinite loop.