Hi All,
I cannot use JDK 1.6.
I needed the Table sorting and filtering functionality in JTable in JDK 1.5.
So what I did was got the following files from JDK1.6 and made up my own library. The following is the list of the files:
DefaultRowSorter.java
JTable.java
RowFilter.java
RowSorter.java
SortOrder.java
RowSorterEvent.java
RowSorterListener.java
TableRowSorter.java
TableStringConverter.java
I wrote my own renderers and created a custom table model by extending the AbstractTableModel.
The sorting and filtering is working fine.
Now I am developing some program in JDK1.5 and using the library created by me for the sorting of JTable. I have extended the DefaultTableModel of JDK1.5. Sorting is working fine.
I face issues when I do drag and drop. The table rows are getting properly exported to the destination table, but when I delete the rows from the source table improper rows are getting deleted.
I convert the rows that are being dragged to the proper index using the convertRowIndexToModel method of the JDK1.6 JTable. But even then I am getting the same results...
Any inputs as to why this is happening? Do I need to add some more
java files from the JDK1.6 library.
[ February 21, 2007: Message edited by: Milesh Dcunha ]