dice Roll
setup Form

import Package
- put the following import at the very top (i.e. on the first line, so that everything else is moved down) of your Source code:
import java.util.Random;
btnRoll
Random seed = new Random(); int diceRoll = seed.nextInt(6)+1; lblResult.setText(Integer.toString(diceRoll));