Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to insert data at run time into JTable ?

843804Sep 18 2004 — edited May 4 2009
Hi guys, i am implementing a small network based application capturing packet data, my plan is to display the details of network packet into a JTable, but reading through the API for JTable and TableModel, i realised most of the code actually deals with database quries which allows the table to be formed before hand. (correct me if i am wrong)

I wish to add new rows to the JTable as my packetCapture Thread is running, appending to the end of the JTable. Suppose i set up a table with empty roles, can i just use the setValueAt(Object aValue, int row, int column) method to dynamically create a new row of data ?

comments pls.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 1 2009
Added on Sep 18 2004
9 comments
1,105 views