How To Refresh Jtable Data

Hi All,

I am recieving the data from the server using SOCKET PROGRAMMING and inserting that data into the JTable after parsing it, but the data is not refreshing in JTable .If i use JOptionPane after adding a row then it works fine and table gets updated but if i remove JOptionPane then it is not refreshing it is executing all the statements at the output prompt but now refreshing the table rows.Plzzzzzzz Let me know the solution.

Thanks in Advance..

[473 byte] By [jamesgoslina] at [2007-11-27 5:56:15]
# 1
After changing the data in the table model, you have to call fireTableRowsInserted, fireTableRowsDeleted, or fireTableDataChanged on the model. That will tell the table to repaint the relavent rows.
BinaryDigita at 2007-7-12 16:26:31 > top of Java-index,Desktop,Core GUI APIs...
# 2

> After changing the data in the table model, you have to call

> fireTableRowsInserted, fireTableRowsDeleted, or

> fireTableDataChanged on the model.

The TableModel should be responsible for firing the appropriate event and the DefaultTableModel does. If you are using a custom TableModel then make sure you firing the correct events as suggested above.

camickra at 2007-7-12 16:26:31 > top of Java-index,Desktop,Core GUI APIs...