How do populate the "Roll" field with the results of "turn" in a JFrame window

时间:2016-04-04 17:17:43

标签: java

Here's what I've done so far ... the code snippet which I am trying inside CalculateButtonHandler class.

private class CalculateButtonHandler implements ActionListener
{
  public void actionPerformed(ActionEvent e)
  {
     //String strTurn = Turn();
     //int Turn = Int.parseInt(strTurn);        
     int diceRollOne = (int)(Math.random() * 6) + 1;
     int diceRollTwo = (int)(Math.random() * 6) + 1;
     int Turn = diceRollOne + diceRollTwo;

     //yourRollTF.setText(Turn);
  }
 }    

0 个答案:

没有答案