连连看输入偶数个图片问题
我在这设计输入显示偶数个图片,为什么我整个程序运行是没反应?public LLKTableModel(int r, int c) {
// 创建数组
st = new String[r][c];// 分配了内存
// 给数组中每个格子放上图片文件名字
for (int i = 0; i < r ; i++)
for (int j = 0; j < c; j++) {
int f=1;// 下面while函数的判断词
java.util.Random ran = new java.util.Random();
int index = ran.nextInt(6);
st[i][j] = "images/" + index + ".gif";
int k = (ran.nextInt(r / 2)) + r / 2;
int h = ran.nextInt(c);
while (f == 1) {
if ("".equals((st[k][h]))) {
st[k][h] = st[i][j];break;
} else {
k = (ran.nextInt(r / 2)) + r / 2;
h = ran.nextInt(c);
break;
}
}
}
}