问题描述
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. redis 如何判断主从延迟时间2. bash - Crontab 中自动执行后没有生效3. 单线程的redis为何会有如此好的性能4. search - redis如何快速查找某个值5. nginx - 关于服务器搭建问题6. 什么样的场景下需要同时使用Redis和Memcached?7. nosql - Redis的key按object-type:id:field格式设计的原因??8. postgresql - 如何将redis集群作为缓存和后端的数据库交互读写9. 如何查看Celery存储在redis里面的结果?10. node.js - Jenkins打包构建node项目时哪台机器必须要有node环境?
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主