Create a die in Java. It changes value whenever you press the button.
Steps:
int n = (int) ((Math.random () * 6) + 1); showStatus ("You rolled a " + n + ".");
if (n==1) picture.setIcon (createImageIcon ("dice1.gif"));