Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
12.4
-
None
-
None
Description
In 8.2, the UI was using BasicScrollPaneUI
the handler of mouse wheel was returning if viewport was null
JViewport vp = scrollpane.getViewport();
if (vp == null) { return; }
In later versions, you introduced SmoothScrollPaneUI
the handler of mouse wheel was returning if viewport is null
but also if the instance is not Scrollable:
JViewport viewport = this.scrollpane.getViewport();
if (viewport != null && viewport.getView() instanceof Scrollable) {
As a result, the wheel stop to function on non scrollable components
Whereas it used to work in the past, as if component was not scrollable it went to
else {
// Viewport's view is not a Scrollable, or fast wheel
// scrolling is not enabled.
BasicScrollBarUI.scrollByUnits(toScroll, direction,
units, limitScroll);
}
To avoid this regression, Netbeans code should mimic default swing behavior which is to scroll even if viewport's view is not a Scrollable.
Â