Sir, please give me some suggestion regarding how to use table model to include database values. i have used metadata to include database values in a JTable, it is working fine and it display results without any error, but i have a problem in refreshing the JTable to include new datas.
Is it possible to refresh the JTable with new values without using table model? whether i have to change the using of metadata to retrieve data from database? is there any way. please give me some hints that how should i proceed..
Thanks in advance.
Joined: Jun 13, 2009
Is it possible to refresh the JTable with new values without using table model?
No. The table can only display data found in the table model.
You can use table.setValueAt(....) to change the data on a cell by cell basis.
Or you can use table.setModel(...) to change all the data at oonce.
Joined: Mar 13, 2011
Thank you sir for your reply. But sir, is my way of of retrieving data from database need to be changed i.e i mean to say that whether the use of metadata need to be changed.