Reputation: 65
// Load the array of images
for(int i=0;i<52;i++){
ImageArray[i] = new ImageIcon("resources/images/cards/"+i+".gif");
}
picture.setIcon(ImageArray[]);
What do I place between the []
?
i cannot be resolved to a variable
Upvotes: 0
Views: 3275
Reputation: 4141
Obviously i
cannot be resolver to type because it was declared within for
loop. Put some number from 0 to 51.
picture.setIcon(ImageArray[0]);
Upvotes: 4