问题描述
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. docker - base image如何选择?2. angular.js - 求解:angular ngModel.$render 值发生变化时,没有自动调用3. docker中如何给已经存在的容器挂载一个本地目录?4. dcoker-compose - docker-compose加了 -d 参数后启动容器还是处于exit 0 状态5. docker - 如何用Doker搭建Ambari集群?6. 安装Docker的时候文档中Installing bash completion scripts这一段没看懂7. Docker怎么删掉不用的layer?8. angular.js - AngularJS的学习9. angular.js - angularjs 指令问题10. docker对windows支持怎么样
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主