问题描述
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. nginx 缓存JS一小时,请问如何更新缓存?2. nginx 匹配首页怪异问题3. 关于 `nginx` 的 `cache` 的问题4. nginx接受post请求时网络断开,会出现什么状况?5. nginx - X-Forwarded-For 和 X-Real-IP 的区别?6. yum install nginx 时能否自定义编译参数?7. nginx如何处理自定义的content-type8. fastcgi - 请教一个nginx的二级目录配置问题9. nginx中的upload module 如何进行权限验证?10. 七牛云存储 - 七牛+Nginx+图标字体=No ’Access-Control-Allow-Origin’ header错误?

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