P
Phill
Hi guys.
I'm having a problem setting the icon on JButtons. Basically I have a 2d
array of ImageIcons and depending on certain criteria I want to set the icon
displayed on the JButton.
At the start of the program I load all the images (gif files) into the array
using:
cardImages[0] = new javax.swing.ImageIcon("/"+(i+2)+"h.gif");
and then to set the icon i'm using,
myButton.setIcon(cardImages[indexB][indexA]);
I'm not getting any error messages, but the images just won't display on the
buttons.
Anyone got any ideas?
I'm having a problem setting the icon on JButtons. Basically I have a 2d
array of ImageIcons and depending on certain criteria I want to set the icon
displayed on the JButton.
At the start of the program I load all the images (gif files) into the array
using:
cardImages[0] = new javax.swing.ImageIcon("/"+(i+2)+"h.gif");
and then to set the icon i'm using,
myButton.setIcon(cardImages[indexB][indexA]);
I'm not getting any error messages, but the images just won't display on the
buttons.
Anyone got any ideas?