问题描述
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无法get到redis中的值?求教2. bash - Crontab 中自动执行后没有生效3. c# - StackExchange.Redis 有时会报TimeoutException是什么原因4. redis第二条命令操作第一条命令的结果5. nginx - 关于服务器搭建问题6. ubuntu - Debian 是否又办法指定特定软件用特定阶段的软件包?7. redis-php set失败8. ubuntu 执行sudo debconf-show msyql-server怎么什么都没有,空的?9. 多进程 - 多个进程去读取redis消息队列是否会发生冲突?10. 缓存 - redis异常退出重启后是怎么跟MYSQL同步的?
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主