问题描述
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. intellij-idea - 使用IDEA+Struts2.0+Apache6.0启动失败2. openresty - 利用lua-nginx-module修改upstream中内容并重新reload3. 配置apache访问svn怎么操作4. apache - 做负载均衡的 nginx 主机配置是不是差一点也没关系?5. Apache服务器开启HTTPS访问6. Apache重写路由,隐藏index.php在本地环境失效7. apache - 如何在 .htaccess 设置规则阻止下载 .htaccess 文件8. apache - 用Appache在windows上搭了文件服务器,速度很慢9. express - nginx配置后访问不到主动ajax请求?10. apache 的 aliases,redirecting,rewriting 都有什么区别?

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