This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 212345 - ETable row selection disappear after fireTableChanged more than one row
Summary: ETable row selection disappear after fireTableChanged more than one row
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Outline&TreeTable (show other bugs)
Version: 7.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-11 01:12 UTC by johnyghk
Modified: 2015-06-18 13:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description johnyghk 2012-05-11 01:12:02 UTC
In NetBeans 6.9, the user select the row on the ETable, the row selection is still remain unchanged after the the whole table refresh. This is very good for the table need to be updated frequently such as Stock Exchange information update. But after NetBeans 7.0, this behavior is changed, row selection disappear after fireTableChanged more than one row.
Comment 1 arittner 2015-06-18 12:41:55 UTC
Yes it could be a change in selection handling in different java versions (I can reproduce this problem on newer Java 6 versions).

The ETable.changeSelectionInModel method should changed from

            if (selected == toSelect) {
                i++;
                j++;                
                continue;
            }

to 

            if (selected == toSelect) {
                rsm.addSelectionInterval(toSelect, toSelect);
                i++;
                j++;                
                continue;
            }

I'm working on different changes for ETable and Outline and add the corrected version.