问题描述
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 - git post-receive hook 可以到多台服务器上执行 git pull 吗?2. Apache服务器开启HTTPS访问3. node - CentOS 用yum安装gcc-c++为啥最新版本是4.4?4. centos - 请教一个关于 iptables 的问题5. apache 的 aliases,redirecting,rewriting 都有什么区别?6. nginx - 关于服务器搭建问题7. 在centos 安装thrift 出现的错误8. apache - 做负载均衡的 nginx 主机配置是不是差一点也没关系?9. linux - 客户-服务器程序错误Program received signal SIGPIPE, Broken pipe.10. visual-studio-code - centos 升级glibc疑问?

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