RFR: 8364146: JList getScrollableUnitIncrement return 0
Phil Race
prr at openjdk.org
Fri Aug 1 19:55:53 UTC 2025
On Mon, 28 Jul 2025 09:14:48 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> It seems JList.getScrollableUnitIncrement can sometime return 0 instead of positive number which is not specified in the javadoc which can lead to confusion. Clarified javadoc as to when it can return 0.
Isn't this just a bug ?
I get zero from the test whenever "-1" is the direction - meaning scroll up - even if I use something like
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/JList.html#getScrollableUnitIncrement(java.awt.Rectangle,int,int)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26500#issuecomment-3145618302
More information about the client-libs-dev
mailing list