问题描述
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. node.js - socket.io官网为什么访问不了2. node.js - 如何让nodejs应用forever自动重启?3. node.js - 上百(有限张)图片,需要在NodeJS中使用,如何最有效的利用内存4. node.js - 【mongodb · mongoose】错误 "Topology was destroyed" 怎么解决?5. node.js - nodejs ioredis All sentinels are unreachable6. node.js - 在使用github pages和hexo搭建网站时,为什么会出现图片资源加载失败?7. node.js -【node】在node中如何打开当前系统已经安装的某个应用?8. node.js - RESTFUL API 除了简单的对TABLE CRUD以外,其他的功能该如何命名?9. node.js - centos7下用yum install 安装nodejs,默认装在哪个目录了?10. node.js - node pm2 如何防止项目误重启删除呢?

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