Advertisement
Boucherwayne78

Untitled

Feb 28th, 2017
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 22.60 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package rollem;
  7.  
  8. import java.awt.Color;
  9. import javax.swing.JOptionPane;
  10.  
  11. /**
  12.  *
  13.  * @author wayne
  14.  */
  15. public class GameJFrame extends javax.swing.JFrame {
  16.  
  17.     //instantiations
  18.     private int diceTotal = 12;
  19.     private final int NUMBER_OF_DICE = 2;
  20.     private int turn = 1;
  21.     private int p1Wins = 0;
  22.     private int p2Wins = 0;
  23.     private DieLabel[] myDiceSet = new DieLabel[ NUMBER_OF_DICE + 1 ];
  24.     Player P1 = new Player();
  25.     Player P2 = new Player();
  26.     String player1Name = JOptionPane.showInputDialog(this, "Player 1's Name:");
  27.     String player2Name = JOptionPane.showInputDialog(this, "Player 2's Name:");
  28.    
  29.    
  30.     /**
  31.      * Creates new form GameJFrame
  32.      */
  33.     public GameJFrame() {
  34.         initComponents();
  35.        
  36.         //set name labels to playernames
  37.         P1NameLabel.setText(player1Name);
  38.         P2NameLabel.setText(player2Name);
  39.        
  40.         //assign labels to spots in array
  41.         myDiceSet[1] = dieLabel1;
  42.         myDiceSet[2] = dieLabel2;
  43.        
  44.         //initial player text color set to blue
  45.         P1NameLabel.setForeground(Color.blue);
  46.     }
  47.  
  48.     /**
  49.      * This method is called from within the constructor to initialize the form.
  50.      * WARNING: Do NOT modify this code. The content of this method is always
  51.      * regenerated by the Form Editor.
  52.      */
  53.     @SuppressWarnings("unchecked")
  54.     // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  55.     private void initComponents() {
  56.  
  57.         P2WinLabel = new javax.swing.JLabel();
  58.         P1WinLabel = new javax.swing.JLabel();
  59.         jLabel7 = new javax.swing.JLabel();
  60.         jLabel6 = new javax.swing.JLabel();
  61.         P1NameLabel = new javax.swing.JLabel();
  62.         P2NameLabel = new javax.swing.JLabel();
  63.         CurrentRollLabel = new javax.swing.JLabel();
  64.         jLabel1 = new javax.swing.JLabel();
  65.         jLabel2 = new javax.swing.JLabel();
  66.         jLabel3 = new javax.swing.JLabel();
  67.         jLabel4 = new javax.swing.JLabel();
  68.         jLabel5 = new javax.swing.JLabel();
  69.         P1GameScoreLabel = new javax.swing.JLabel();
  70.         P2TurnScoreLabel = new javax.swing.JLabel();
  71.         P2GameScoreLabel = new javax.swing.JLabel();
  72.         P1TurnScoreLabel = new javax.swing.JLabel();
  73.         RollButton = new javax.swing.JButton();
  74.         StopButton = new javax.swing.JButton();
  75.         jPanel1 = new javax.swing.JPanel();
  76.         dieLabel1 = new rollem.DieLabel();
  77.         dieLabel2 = new rollem.DieLabel();
  78.  
  79.         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  80.         setMaximumSize(new java.awt.Dimension(1108, 800));
  81.         setPreferredSize(new java.awt.Dimension(1108, 800));
  82.  
  83.         P2WinLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  84.         P2WinLabel.setText("0");
  85.  
  86.         P1WinLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  87.         P1WinLabel.setText("0");
  88.  
  89.         jLabel7.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  90.         jLabel7.setText("Wins:");
  91.  
  92.         jLabel6.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  93.         jLabel6.setText("Wins:");
  94.  
  95.         P1NameLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  96.         P1NameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  97.         P1NameLabel.setText("Player 1 Name");
  98.  
  99.         P2NameLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  100.         P2NameLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  101.         P2NameLabel.setText("Player 2 Name");
  102.  
  103.         CurrentRollLabel.setText("Current Roll: 12");
  104.  
  105.         jLabel1.setFont(new java.awt.Font("Dialog", 1, 36)); // NOI18N
  106.         jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  107.         jLabel1.setText("Roll 'Em Pigs!");
  108.         jLabel1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  109.  
  110.         jLabel2.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  111.         jLabel2.setText("Turn Score:");
  112.  
  113.         jLabel3.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  114.         jLabel3.setText("Game Score:");
  115.  
  116.         jLabel4.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  117.         jLabel4.setText("Game Score:");
  118.  
  119.         jLabel5.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  120.         jLabel5.setText("Turn Score:");
  121.  
  122.         P1GameScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  123.         P1GameScoreLabel.setText("0");
  124.  
  125.         P2TurnScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  126.         P2TurnScoreLabel.setText("0");
  127.  
  128.         P2GameScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  129.         P2GameScoreLabel.setText("0");
  130.  
  131.         P1TurnScoreLabel.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  132.         P1TurnScoreLabel.setText("0");
  133.  
  134.         RollButton.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  135.         RollButton.setText("Roll");
  136.         RollButton.addActionListener(new java.awt.event.ActionListener() {
  137.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  138.                 RollButtonActionPerformed(evt);
  139.             }
  140.         });
  141.  
  142.         StopButton.setFont(new java.awt.Font("Dialog", 1, 24)); // NOI18N
  143.         StopButton.setText("Stop");
  144.         StopButton.addActionListener(new java.awt.event.ActionListener() {
  145.             public void actionPerformed(java.awt.event.ActionEvent evt) {
  146.                 StopButtonActionPerformed(evt);
  147.             }
  148.         });
  149.  
  150.         jPanel1.setLayout(new java.awt.GridLayout(1, 2));
  151.         jPanel1.add(dieLabel1);
  152.         jPanel1.add(dieLabel2);
  153.  
  154.         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  155.         getContentPane().setLayout(layout);
  156.         layout.setHorizontalGroup(
  157.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  158.             .addGroup(layout.createSequentialGroup()
  159.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  160.                     .addGroup(layout.createSequentialGroup()
  161.                         .addGap(63, 63, 63)
  162.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
  163.                             .addComponent(P1NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE)
  164.                             .addGroup(layout.createSequentialGroup()
  165.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  166.                                     .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE)
  167.                                     .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  168.                                         .addComponent(jLabel3, javax.swing.GroupLayout.Alignment.TRAILING)
  169.                                         .addComponent(jLabel2)))
  170.                                 .addGap(18, 18, 18)
  171.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  172.                                     .addComponent(P1GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
  173.                                     .addComponent(P1TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
  174.                                     .addComponent(P1WinLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE))
  175.                                 .addGap(14, 14, 14)))
  176.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  177.                             .addGroup(layout.createSequentialGroup()
  178.                                 .addGap(18, 18, 18)
  179.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  180.                                     .addGroup(layout.createSequentialGroup()
  181.                                         .addComponent(RollButton, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
  182.                                         .addGap(61, 61, 61)
  183.                                         .addComponent(StopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE))
  184.                                     .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  185.                                 .addGap(65, 65, 65)
  186.                                 .addComponent(P2NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 269, javax.swing.GroupLayout.PREFERRED_SIZE))
  187.                             .addGroup(layout.createSequentialGroup()
  188.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  189.                                     .addGroup(layout.createSequentialGroup()
  190.                                         .addGap(444, 444, 444)
  191.                                         .addComponent(jLabel5)
  192.                                         .addGap(24, 24, 24))
  193.                                     .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  194.                                         .addGap(149, 149, 149)
  195.                                         .addComponent(CurrentRollLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
  196.                                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  197.                                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  198.                                             .addComponent(jLabel4)
  199.                                             .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
  200.                                         .addGap(18, 18, 18)))
  201.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  202.                                     .addComponent(P2TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
  203.                                     .addComponent(P2GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
  204.                                     .addComponent(P2WinLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)))))
  205.                     .addGroup(layout.createSequentialGroup()
  206.                         .addGap(270, 270, 270)
  207.                         .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 518, javax.swing.GroupLayout.PREFERRED_SIZE)))
  208.                 .addContainerGap(63, Short.MAX_VALUE))
  209.         );
  210.         layout.setVerticalGroup(
  211.             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  212.             .addGroup(layout.createSequentialGroup()
  213.                 .addGap(12, 12, 12)
  214.                 .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
  215.                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  216.                     .addGroup(layout.createSequentialGroup()
  217.                         .addGap(50, 50, 50)
  218.                         .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  219.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  220.                         .addComponent(CurrentRollLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)
  221.                         .addGap(18, 18, 18)
  222.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  223.                             .addComponent(RollButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
  224.                             .addComponent(StopButton, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
  225.                         .addGap(30, 30, 30))
  226.                     .addGroup(layout.createSequentialGroup()
  227.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  228.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  229.                             .addComponent(P2NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE)
  230.                             .addComponent(P1NameLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 75, javax.swing.GroupLayout.PREFERRED_SIZE))
  231.                         .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  232.                         .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  233.                             .addGroup(layout.createSequentialGroup()
  234.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  235.                                     .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
  236.                                     .addComponent(P2TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
  237.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  238.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  239.                                     .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
  240.                                     .addComponent(P2GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
  241.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  242.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  243.                                     .addComponent(jLabel7)
  244.                                     .addComponent(P2WinLabel)))
  245.                             .addGroup(layout.createSequentialGroup()
  246.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  247.                                     .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
  248.                                     .addComponent(P1TurnScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
  249.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  250.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  251.                                     .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE)
  252.                                     .addComponent(P1GameScoreLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 45, javax.swing.GroupLayout.PREFERRED_SIZE))
  253.                                 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  254.                                 .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  255.                                     .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)
  256.                                     .addComponent(P1WinLabel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
  257.                         .addContainerGap(89, Short.MAX_VALUE))))
  258.         );
  259.  
  260.         pack();
  261.     }// </editor-fold>                        
  262.  
  263.     private void RollButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
  264.    
  265.         if (turn == 1)
  266.         {
  267.             CurrentRollLabel.setText("Current Roll: " + P1.rollDie(myDiceSet[1], myDiceSet[2]));
  268.             P1TurnScoreLabel.setText(P1.getTurnScore() + "");
  269.             if (P1.isTurnScoreLost())
  270.             {
  271.                 turn = 2;
  272.                 P1NameLabel.setForeground(Color.black);
  273.                 P2NameLabel.setForeground(Color.blue);
  274.                 return;
  275.             }
  276.         }
  277.        
  278.         if (turn == 2)
  279.         {
  280.             CurrentRollLabel.setText("Current Roll: " + P2.rollDie(myDiceSet[1], myDiceSet[2]) + "");
  281.             P2TurnScoreLabel.setText(P2.getTurnScore() + "");
  282.             if (P2.isTurnScoreLost())
  283.             {
  284.                 turn = 1;
  285.                 P1NameLabel.setForeground(Color.blue);
  286.                 P2NameLabel.setForeground(Color.black);
  287.             }
  288.         }
  289.        
  290.     }                                          
  291.  
  292.     private void StopButtonActionPerformed(java.awt.event.ActionEvent evt) {                                          
  293.         if (turn == 1)
  294.         {
  295.             if (P1.addTurnScoreToGameScore())
  296.             {
  297.             if (P1.hasWon())
  298.             {
  299.                 int temp = JOptionPane.showConfirmDialog(this, player1Name + " wins! Play again?");
  300.                 if (temp == JOptionPane.NO_OPTION)
  301.                 {
  302.                     System.exit(1);
  303.                 }
  304.                 else
  305.                 {
  306.                     P1.reset();
  307.                     P2.reset();
  308.                     P1TurnScoreLabel.setText(P1.getTurnScore() + "");
  309.                     P2TurnScoreLabel.setText(P2.getTurnScore() + "");
  310.                     P1GameScoreLabel.setText(P1.getGameScore() + "");
  311.                     P2GameScoreLabel.setText(P2.getGameScore() + "");
  312.                     turn = 2;
  313.                     p1Wins++;
  314.                     P1WinLabel.setText(p1Wins + "");
  315.                 }
  316.                 return;
  317.             }
  318.            
  319.             turn = 2;
  320.             P1NameLabel.setForeground(Color.black);
  321.             P2NameLabel.setForeground(Color.blue);
  322.             CurrentRollLabel.setText("Current Roll: ");
  323.             P1TurnScoreLabel.setText("");
  324.             P1GameScoreLabel.setText(P1.getGameScore() + "");
  325.             return;
  326.         }
  327.         }
  328.        
  329.         if (turn == 2)
  330.         {
  331.             if (P2.addTurnScoreToGameScore())
  332.             {
  333.             if (P2.hasWon())
  334.             {
  335.                 int temp = JOptionPane.showConfirmDialog(this, player2Name + " wins! Play again?");
  336.                 if (temp == JOptionPane.NO_OPTION)
  337.                 {
  338.                     System.exit(1);
  339.                 }
  340.                 else
  341.                 {
  342.                     P1.reset();
  343.                     P2.reset();
  344.                     P1TurnScoreLabel.setText(P1.getTurnScore() + "");
  345.                     P2TurnScoreLabel.setText(P2.getTurnScore() + "");
  346.                     P1GameScoreLabel.setText(P1.getGameScore() + "");
  347.                     P2GameScoreLabel.setText(P2.getGameScore() + "");
  348.                     turn = 1;
  349.                     p2Wins++;
  350.                     P2WinLabel.setText(p2Wins + "");
  351.                 }
  352.                 return;
  353.             }
  354.            
  355.             turn = 1;
  356.             P1NameLabel.setForeground(Color.blue);
  357.             P2NameLabel.setForeground(Color.black);
  358.             CurrentRollLabel.setText("Current Roll: ");
  359.             P2TurnScoreLabel.setText("");
  360.             P2GameScoreLabel.setText(P2.getGameScore() + "");
  361.         }
  362.         }
  363.     }                                          
  364.  
  365.     /**
  366.      * @param args the command line arguments
  367.      */
  368.     public static void main(String args[]) {
  369.         /* Set the Nimbus look and feel */
  370.         //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
  371.         /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
  372.          * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
  373.          */
  374.         try {
  375.             for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
  376.                 if ("Nimbus".equals(info.getName())) {
  377.                     javax.swing.UIManager.setLookAndFeel(info.getClassName());
  378.                     break;
  379.                 }
  380.             }
  381.         } catch (ClassNotFoundException ex) {
  382.             java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  383.         } catch (InstantiationException ex) {
  384.             java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  385.         } catch (IllegalAccessException ex) {
  386.             java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  387.         } catch (javax.swing.UnsupportedLookAndFeelException ex) {
  388.             java.util.logging.Logger.getLogger(GameJFrame.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
  389.         }
  390.         //</editor-fold>
  391.  
  392.         /* Create and display the form */
  393.         java.awt.EventQueue.invokeLater(new Runnable() {
  394.             public void run() {
  395.                 new GameJFrame().setVisible(true);
  396.             }
  397.         });
  398.     }
  399.  
  400.     // Variables declaration - do not modify                    
  401.     private javax.swing.JLabel CurrentRollLabel;
  402.     private javax.swing.JLabel P1GameScoreLabel;
  403.     private javax.swing.JLabel P1NameLabel;
  404.     private javax.swing.JLabel P1TurnScoreLabel;
  405.     private javax.swing.JLabel P1WinLabel;
  406.     private javax.swing.JLabel P2GameScoreLabel;
  407.     private javax.swing.JLabel P2NameLabel;
  408.     private javax.swing.JLabel P2TurnScoreLabel;
  409.     private javax.swing.JLabel P2WinLabel;
  410.     private javax.swing.JButton RollButton;
  411.     private javax.swing.JButton StopButton;
  412.     private rollem.DieLabel dieLabel1;
  413.     private rollem.DieLabel dieLabel2;
  414.     private javax.swing.JLabel jLabel1;
  415.     private javax.swing.JLabel jLabel2;
  416.     private javax.swing.JLabel jLabel3;
  417.     private javax.swing.JLabel jLabel4;
  418.     private javax.swing.JLabel jLabel5;
  419.     private javax.swing.JLabel jLabel6;
  420.     private javax.swing.JLabel jLabel7;
  421.     private javax.swing.JPanel jPanel1;
  422.     // End of variables declaration                  
  423. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement