title: How to display rows in jLabel in Java from Ms Access database?
body: <p>I'm currently having a problem with displaying Row Values from MS Access to Java jLabel.</p>
  
  <p>I have a Ms Access database with the name <code>Table</code> with 3 rows i just want to display the rows in java <code>jlabels</code> see the picture but it shows the first row and I'm currently confused Thanks!</p>
  
  <p><a href="https://i.stack.imgur.com/ZOCVG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZOCVG.png" alt="GUI WITH &lt;code&gt;JLABELS&lt;/code&gt;"></a></p>
  
  <p><a href="https://i.stack.imgur.com/IoR4J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/IoR4J.png" alt="My MS ACCESS TABLE"></a></p>
  
  <pre><code>try {
  
          resultset.first();
  
  
          String name = "Name: ";
          String dmg = "Damage: ";
          String type = "Ammo Type: ";
  
  
          //row1
          weapon1.setText(name+resultset.getString("weapons"));
          weapon1dmg.setText(dmg+resultset.getString("weaponDMG"));
          weapon1type.setText(type+resultset.getString("weaponAmmoType"));
  
          //row2
          weapon2.setText(name+resultset.getString("weapons"));
          weapon2dmg.setText(dmg+resultset.getString("weaponDMG"));
          weapon2type.setText(type+resultset.getString("weaponAmmoType"));
  
          //row3
          weapon3.setText(name+resultset.getString("weapons"));
          weapon3dmg.setText(dmg+resultset.getString("weaponDMG"));
          weapon3type.setText(type+resultset.getString("weaponAmmoType"));
  
      }
  </code></pre>