title: i want to print all armstrong number between 1 to 1000 in a textbox using awt or swing but i only get last value by my code .So plc help me
body: <p>i want to print all armstrong number between 1 to 1000 in a textfield using awt or swing but i only get last value by my code .So pls help me   </p>
  
  <pre><code>    public void actionPerformed(ActionEvent e)
      {
          String s1=tf.getText();
          int n1=Integer.parseInt(s1);
          for(int n=0;n&lt;10000;n++)
          {
              int sum=0;
              int number=n;
              int original=number;
              while(number&gt;0)
              {
              int r=number%10;
              sum+=r*r*r;
              number=number/10;
              }
              if(sum==original)
              {
                  tf1.setText(String.valueOf(original[i]));
  
              }
          }
      }
  </code></pre>