问题描述
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. centos - win下连接openvpn失败2. Apache服务器开启HTTPS访问3. centos 6.4下tomcat6配置虚拟目录失败4. bash - linux time 命令,为什么一定要指定绝对路径,5. apache 的 aliases,redirecting,rewriting 都有什么区别?6. linux - 客户-服务器程序错误Program received signal SIGPIPE, Broken pipe.7. bash - Crontab 中自动执行后没有生效8. nginx - 关于服务器搭建问题9. centos - 请教一个关于 iptables 的问题10. centos - 在 nginx 服务中读取信息时出错:没有那个文件或目录

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