问题描述
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 - 关于服务器搭建问题2. Apache服务器开启HTTPS访问3. linux - 客户-服务器程序错误Program received signal SIGPIPE, Broken pipe.4. linux - git post-receive hook 可以到多台服务器上执行 git pull 吗?5. apache 的 aliases,redirecting,rewriting 都有什么区别?6. apache - 做负载均衡的 nginx 主机配置是不是差一点也没关系?7. shell - 外网SSH通过非22端口进入内网,请问有没有可能通过使用避免暴露端口?8. 配置apache访问svn怎么操作9. linux - 怎么使用yum安装10. centos - 请教一个关于 iptables 的问题

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