java - Only Last Value is Printing From Database in jTable -


I am going to show the stock record in jTable from the database. But when I get the jTable value from the database it is only showing the last value.

  while (rs.next ()) {string vendor = rsgetstring ("vendor"); String p_type = rs.getString ("P_TYPE"); String p_name = rs.getString ("P_NAME"); String unit = r.getString ("UNITS"); Letter unit_price = rs.getString ("UNIT_PRICE"); Stock_ Table.setValueAt (Vendor, 1, 0); Stock_ Table.setValueAt (Vendor, 2, 0); Stock_ Table.setValueAt (Vendor, 3, 0); Stock_tout.SetVellLate (vendor, 4, 0); First of all, Java docs clearly shows that the two int value line And column in that order.  

Based on your example, you are updating the first column of 1, 2, 3 and 4 rows. P>

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -