Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何用图像洗牌JButton?_Java_Arrays_Jbutton_Shuffle - Fatal编程技术网

Java 如何用图像洗牌JButton?

Java 如何用图像洗牌JButton?,java,arrays,jbutton,shuffle,Java,Arrays,Jbutton,Shuffle,此处出现错误: for(int h = 0; h <= picture; h++) { list.add(picture[h]); picture.addActionListener(this); } Collections.shuffle(list); for(int h=0;h您没有给出错误,但可能是由于 for(int h=0;h<=picture;h++) //this line. picture is array for(int h=0;hw错

此处出现错误:

for(int h = 0; h <= picture; h++)
{
      list.add(picture[h]);
      picture.addActionListener(this);

}
Collections.shuffle(list);

for(int h=0;h您没有给出错误,但可能是由于

for(int h=0;h<=picture;h++) //this line. picture is array

for(int h=0;hw错误是什么?请将其减少为一个。
for(int h=0;h<=picture;h++) //this line. picture is array
for(int h=0;h<picture.length;h++)
{
//..rest of code