RFR: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize() [v12]

Alexey Ivanov aivanov at openjdk.org
Mon Jan 29 11:35:49 UTC 2024


On Mon, 29 Jan 2024 10:17:29 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/JScrollBar.java line 785:
>> 
>>> 783:      * Returns the minimum size for the {@code JScrollBar}.
>>> 784:      * The scrollbar is flexible along its scrolling axis and
>>> 785:      * rigid along the other axis.
>> 
>> I would rather clarify this property by describing how the returned value is derived from the preferred size. Does it make sense? Should it be an `@implNote` rather than a spec? Or is it completely unnecessary?
>
> Not sure..Since it is already reviewed and approved by Phil, I chose to keep it same..

This change requires a CSR which hasn't been approved yet. It's an opportunity to improve the specification for `getMinimumSize` and `getMaximumSize`.

After the CSR is approved, further updates will be more of a hassle.

This is why I'm asking these questions here. “No, we don't want to update,” is also a valid answer. Let's see what @prrace has to say.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15325#discussion_r1469448996


More information about the client-libs-dev mailing list