title: Beginner Java Netbeans: How do I display for loop in jlabel?
body: <p>I have looked on this site and nothing has really answered my question. This is what my code looks like:</p>
  
  <pre><code>    // declare user input variables
      int min, max;
  
      //assign user input to min and max
      min = Integer.parseInt(Min.getText ());
      max = Integer.parseInt(Max.getText ());
  
      //use for loop to display the values
      for (int n = min; n&lt;= max; n++){
          System.out.println(Integer.toString(n));
          Output.setText(Integer.toString(n));
      }
  </code></pre>
  
  <p>and the System.out.println () yields the correct answer. for instance, the user inputs 2 and 9, it will say:</p>
  
  <pre><code>run:
  2
  3
  4
  5
  6
  7
  8
  9
  </code></pre>
  
  <p>but the jLabel I'm trying to set the text to, Output, only displays 9. I know his might be stupidly simple but hey, I'm a beginner. Any help would be appreciated.</p>