Dice Roller
A Java Swing application that simulates rolling a six-sided die.
To roll the die, simply click the "Roll" button in the application window. The result of the roll will be displayed in the window.
- Java SE Development Kit (JDK) 8 or later
To install Java, follow these steps:
- Visit the Java SE Downloads page.
- Download the JDK for your operating system and install it.
- Set the
JAVA_HOME
environment variable to the directory where you installed the JDK.
You can use any Java IDE to edit and run the code. Some popular options include:
To run the application:
- Open the code in your IDE.
- Run the
DiceRoller
class. - The application window should appear. Click the "Roll" button to roll the die.