Reputation: 521
I wan't smooth scrolling for a JList that shows some search results. With the default unit increment of the vertical scroll bar the scrollling speed is too slow. When increasing the unit increment the scrolling speed is faster but for the user the scrolling looks very abruptly and not very smooth.
Is there any built-in functionality or any other approach that allows smooth scrolling like in web browsers? Every proposed solution I found so far (e.g. this one) just increases the unit increment but that's not what I really want (or what a user is likely expecting).
Upvotes: 1
Views: 380
Reputation: 205885
JList
implements Scrollable
to achieve this. You can override getScrollableUnitIncrement()
to return your preferred increment for a given orientation and direction.
Upvotes: 3