On Thu, 27 Nov 2025 21:42:10 GMT, Sergey Bylokhov <[email protected]> wrote:

> No, it’s not necessarily scrolling. It can remove items from the visible area 
> and add items that should be visible.

What do you mean?

Scrolling means exactly this: move the visible area so that the item at the 
`index` becomes visible; this implies other items will become invisible.

> To do this, it only needs to update the current L&F. List.makeVisible() spec 
> allows this.

I don't understand what you mean here, either.

---

Still why do you think the selection may change during this operation? If all 
the items in the list are selected, they have to remain selected, whatever the 
list itself does to ensure the item at the `index` is visible on the screen. If 
none of the items are selected, it has to remain so.

Calling `makeVisible` should never select or deselect items in the list.

In this test, `getSelectedIndexes` would return an array that contains `[0, 1, 
…, list.getItemCount() -1]`, in other words all the indexes of the items in the 
list.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/28245#discussion_r2572407734

Reply via email to