title: Using a for loop to set values in jTextFields taken from a database
body: <p>I want to execute a query and add those values to text fields inside a loop. I want to have something like this,</p>
  
  <pre><code>String query = "select student_id,String firstName,lastName,address,phoneNumber,mobileNumber,fathersName,fathersOccupation,mothersName,nationality,qualification from student where student_id='" + jTextField5.getText().toString() + "'";
          ResultSet rs = DBOptions.executeSQLQuery(query);
          rs.next();
          for(int i=0; i &lt; 11; i++){
              String s = rs.getString(i+1);
              String field = "jTextField"+i+".setText(s)";//can you do something like this and use the string to add values to individual textFeilds?
          }
  </code></pre>
  
  <p>I have tried looking at ArrayList and other ways but they seem confusing......</p>