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

Summary: ETable row selection disappear after fireTableChanged more than one row
Product: platform Reporter: johnyghk <johnyghk>
Component: Outline&TreeTableAssignee: Martin Entlicher <mentlicher>
Status: NEW ---    
Severity: normal CC: arittner
Priority: P3    
Version: 7.0   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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.