问题描述
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 - npm install 时报错tunneling socket could not be established求大神帮忙2. node.js - nodejs使用for of遍历Map怎样获取到循环变量3. node.js - jsonp跨域为何get不到想要的内容4. node.js - node 引入文件问题5. redis 如何判断主从延迟时间6. node.js - express路由问题7. node.js - node+mongoose初学疑问8. node.js - Node框架Egg.js和Express有何区别,哪个更适合新手学习。9. node.js - nodejs可以判断客户端的浏览器类型吗10. koa2 - node.js koa ctx=> 报错
网公网安备:皖ICP备2020019022号-8 Copyright ¢ 2020-2025 Powered by V1.8 All Rights Reserved 技术支持:乐呵呵网
声明:本站所有资源以学习为主