title: Displaying increment values in JOptionPane
body: <p>I'm trying to build a code using <code>JOptionPane</code> that will display the first value, 1, and increment it until it reaches a certain amount, i.e. 5, while displaying each incremented value. I can figure out how to make them all appear on different lines within the dialog output, I'm just struggling with the coding for displaying the beginning increment and each subsequent value until the final value is reached. Thanks for the assistance.</p>
  <pre><code>begin = 1; // Sets beginning day to 1
  dailySub = cents * multiplier;
  nextDay = dailySub * multiplier;
  while (begin &lt; days)
  {
      begin++;
      nextDay = dailySub * multiplier;
  }
  JOptionPane.showMessageDialog(null, &quot;Cents | Days | Total \n&quot; + begin + &quot;&quot; + dailySub + &quot;\n&quot; + (begin++));
  </code></pre>