-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
6
-
x86
-
linux
FULL PRODUCT VERSION :
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OpenSuSE 10.3
A DESCRIPTION OF THE PROBLEM :
A call on JTable.clearSelection() should also clear the cached value lastModelSelection in JTable.SortManager, if a RowSorter is used.
Otherwise, if you call:
JTable.clearSelection();
...Sorter.setRowFilter(...) or ...Sorter.sort()
the Selection will be restored.
My Workaround is:
JTable.clearSelection();
TableModel.fireTableRowsUpdated(0,0);
because this will update lastModelSelection;
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I couldnt reproduce this in a small Demo Program.
But a Debug-Session in my Application gave the in Description written results.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
JTable.clearSelection();
TableModel.fireTableRowsUpdated(0,0);
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Server VM (build 10.0-b23, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
OpenSuSE 10.3
A DESCRIPTION OF THE PROBLEM :
A call on JTable.clearSelection() should also clear the cached value lastModelSelection in JTable.SortManager, if a RowSorter is used.
Otherwise, if you call:
JTable.clearSelection();
...Sorter.setRowFilter(...) or ...Sorter.sort()
the Selection will be restored.
My Workaround is:
JTable.clearSelection();
TableModel.fireTableRowsUpdated(0,0);
because this will update lastModelSelection;
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
I couldnt reproduce this in a small Demo Program.
But a Debug-Session in my Application gave the in Description written results.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
JTable.clearSelection();
TableModel.fireTableRowsUpdated(0,0);