RowSorter keeps the initial index?

Hello All,

I have implemented the TableRowSorter using table.setAutoCreateRowSorter(true);

Now, after some data is fed in, I have sorted the table.

If initially the column 1 had values

a

c

b

Now after sorting it has become

a

b

c

Now, when I select the 3rd row from the sorted table and delete it, the table deletes the 2nd row which has the value b. Could anyone let me know where I am going wrong?

I also used

sorter.convertRowIndexToModel(table.getSelectedRow());

to get the right row... But this returns the wrong row I guess... Could anyone please help me?

Thanks & Regards

Irfaan

[692 byte] By [Irfan_dcrtia] at [2007-11-27 10:04:19]
# 1
I usually use table.convertRowIndexToModel which always works for meICE
icewalker2ga at 2007-7-13 0:39:19 > top of Java-index,Desktop,Core GUI APIs...
# 2
No.. It is not working for me... Any other ideas?
Irfan_dcrtia at 2007-7-13 0:39:19 > top of Java-index,Desktop,Core GUI APIs...
# 3
if convertRowIndexToModel() is not working for you then the problem lies elsewhere within your code.Post your code here using the formatting tags so we can take a look.
c0demonk3ya at 2007-7-13 0:39:19 > top of Java-index,Desktop,Core GUI APIs...