I am trying to implement user input in my dice rolling program but I do not understand where I need to add the actionListener. What I want the program to do is allow the user to click on each roll button and have the output be between 1 and 6. I figured I can put it in the "main" class due to the size of the program but I would like to know the best way to go about adding the actionListener into a sub-class for practice purposes.
Here is my code thus far:
posted 2 years ago
Don't try to implement an application on the GUI. Have you got the application working without a GUI?
Never write an empty catch; you will miss the Exception thrown because you have a comma rather than a dot in the middle of the look'n'feel name.