I have been given the assignment to modify the application of Section 6.10 of th
ID: 2246828 • Letter: I
Question
I have been given the assignment to modify the application of Section 6.10 of the Deitel & Deitel textbook to provide a GUI that enables the user to click a JButton to roll the dice. The application should also display four JLabels and four JTextFields, with one JLabel for each JTextField. The JTextFields should be used to display the values of each die and the sum of the dice after each roll. The point should be displayed in the fourth JTextField when the user does not win or lose on the first roll and should continue to be displayed until the game is lost.
I have created a gui.java file which contains the JLabel fields, JTextField fiels and JButton field. I am trying to do the event handlers. I started to rewrite alot of the code in Craps.java to be within methods instead of the main method, but I wasn't sure if that was the right approach. When I tried to do that I had problems getting the gameStatus to populate in the handler. The 2 files that are being used are Craps.java and Gui.java. Thanks!
Craps.java
// Craps.java Section 6.10 of the Deitel & Deitel textbook: Figure 6.8:
File Gui.java
Explanation / Answer
the code is correct i think
File Gui.java
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.