问题描述
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]);
}
}
问题解答
回答1:第二个循环j打成i了,死循环
问题描述
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]);
}
}
问题解答
回答1:第二个循环j打成i了,死循环相关文章:1. linux - 如何限制文件下载速度?2. gcc - Linux下C语言的一道经典面试题3. linux - liunx在编译的时候,如果关闭了xshell窗口 如何再次查看编译的过程?4. Linux下C语言的一道经典面试题5. 32岁了是否还适合转行做Linux6. 前端 - 如何优化 goagent.org 的页面载入速度?7. mysql 使用 join 还是 "," 进行多表查询???8. 服务器是怎么做到安全防御的呢?9. linux - 编译安装了mysql 5.6,为什么mysql安装目录下scripts木有呢?10. How to start Ubuntu desktop after two times ssh login my server?

网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主