问题描述
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. javascript - (_a = [""], _a.raw = [""],....); js一个小括号的是什么意思?2. $.ajax 跨域 options3. 函数里面的参数index表示是什么?4. 什么是DOM对象和DOM元素?5. Linux下一道C语言的经典面试题6. node.js mysql Cannot find module "net" 和 "tls"和"fs" 的问题7. rgb(255, 0, 0)不是红颜色吗,有三个p标签不同背景色的,为什么只返回第一个红色的?8. JS如何判断网站访问的客户端是手机还是PC?9. 发现 <li><a href="/index.php">回到前台</a></li>这样回到首页后,不是登录状态10. Jquery同类事件如何批量处理?

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