DevCharly commented on PR #5337: URL: https://github.com/apache/netbeans/pull/5337#issuecomment-1429739891
Tried this. Works fine regarding "selection avoidance", but have the feeling that autoscrolling works not as good as before. Have running two NB instances side-by-side (NB 16 from DMG and compiled master branch; on macOS). Autoscrolling works pretty reliable in NB 16, but in the version with this PR, it often does not autoscroll. Seems to depend on how fast I move the mouse out of the table... Have tried a different solution: - removed `mouseDragged` listener that invokes `scrollRectToVisible()` - added following code from [JTable.changeSelection()](https://github.com/openjdk/jdk/blob/7dfe75cf553193faf709cff6b8b2505680d7cebc/src/java.desktop/share/classes/javax/swing/JTable.java#L2516-L2521) into "veto return" block in `ETable.changeSelection()` I think this works a little bit better, but not as reliable as before. Don't know why 😕 Anyway, for compatibility, I would move autoscrolling to `ETable.changeSelection()` as done in `super.changeSelection()`. This also avoids an additional listener and a possible side-effect of always scrolling while dragging. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
