问题描述
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. javascript - 关于input="file",重复选择同一文件时不触发change事件的问题2. linux - 关于ubuntu中gedit无权限保存的问题3. nginx如何匹配静态资源4. nginx - OpenResty 的升级问题5. 如何让nginx对某一个ip在某一时间段内重定向6. linux - nginx添加add_header能启动,但不生效,也不报错7. linux - shell脚本中怎么判断发行版?8. nginx日志监控9. javascript - <input type="file">文件正在上传时需要有弹出框提示正在上传,上传完后弹出框消失,这个该如何写呢?10. url-rewrite - nginx rewrite的问题

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