Updating JTable cell after sorting by column

When i update a cell data of JTable after sorting it by one column, though the data gets updated but it does not remain sorted and the data appears back as it appeared for the first time. How can i ensure that the data table structure does not change once i update a cell apart from the cell which i have updated.

Thanks,

Santosh

[348 byte] By [Santosh.Bhushana] at [2007-11-27 11:50:47]
# 1

> and the data appears back as it appeared for the first time

Then you are doing something wrong. Using the setValueAt(...) method will not cause the entire table to be sorted. It should however sort the row into its proper position.

> How can i ensure that the data table structure does not change

It should not change unless you are firing the tableDataStructureChanged event, which is totally unnecessary.

camickra at 2007-7-29 18:34:03 > top of Java-index,Desktop,Core GUI APIs...
# 2

Thanks, i got what you said.

Message was edited by:

Santosh.Bhushan

Santosh.Bhushana at 2007-7-29 18:34:03 > top of Java-index,Desktop,Core GUI APIs...