Good day friends,
What I am trying to do is change the Icon of a label,depending on the value of a variable.
What I did is this :
But it wont work.I also get no errors.
What happens is that when roll==2,the label just disappears...
What I am trying to do is change the Icon of a label,depending on the value of a variable.
What I did is this :
ImageIcon icon = new ImageIcon("C:\\Dice_2.jpg");
if(roll==2) lbl_dice.setIcon(icon);
But it wont work.I also get no errors.
What happens is that when roll==2,the label just disappears...