On Thu, 2 Apr 2026 07:04:24 GMT, Prasanta Sadhukhan <[email protected]> wrote:
> But if BasicScrollBarUI is extended and accessed, then these methods are > accessible too as they are protected not private, what to gain by making it > public? I agree: _if_ BasicScrollBarUI is extended then the subclass already has the access it wants. But I'm suggesting there are compelling use cases where you don't want to extend or alter BasicScrollBarUI. Making devs subclass BasicScrollBarUI just to get at this particular info is a hassle & a constraint. Here's a sample use case. If I open a PDF of a book in Adobe Acrobat and I drag the scrollbar thumb: a tooltip appears show the page number. <img width="296" height="348" alt="image" src="https://github.com/user-attachments/assets/0176f6bf-a240-4a3b-90b6-3d3c26ad9096" /> How would you recommend we approach programming that UI in Swing, esp if on Windows we wanted to use the WindowsScrollBarUI ? Specifically: how would we know exactly where to position the tooltip? ------------- PR Comment: https://git.openjdk.org/jdk/pull/30209#issuecomment-4175405235
