问题描述
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 - nodejs superagent读取网页内容,怎么控制请求的频率2. android - Could not read input channel file descriptors from parcel.崩溃怎么解决3. angular.js - angular 项目开发中页面跳转的问题4. android - 为View添加onClicklistener没有生效5. 框架学习 - Android 界面框架!6. angular.js - angularjs state.go 参数 刷新页面 参数就获取不到了 怎么办7. android - 重复登录 怎么解决 比如两台设备同时登录一个账号8. Android数据库update方法的问题9. sqlite - Android 中如何处理多用户的数据存储?10. angular.js - 接口有三个输入参数。 其中有一个是数组。 用angular 怎么传啊

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