Integrated: 6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize()
Prasanta Sadhukhan
psadhukhan at openjdk.org
Sun Feb 18 16:17:59 UTC 2024
On Thu, 17 Aug 2023 08:42:13 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> javadoc contract for JComponent.setMinimumSize(Dimension) states:
>
> "Sets the minimum size of this component to a constant value. Subsequent calls to getMinimumSize will always return this value..."
>
> However, JScrollBar overrides getMinimumSize() and breaks this contract - it always returns a minimum size derived from the preferred size even if you have previously called setMinimumSize()
>
> Fix is made to check if mnimumSize is set and if so, honour it..
This pull request has now been integrated.
Changeset: 39627bc4
Author: Prasanta Sadhukhan <psadhukhan at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/39627bc4296dc1cde83c7ef2f2ece1719015df64
Stats: 51 lines in 2 files changed: 42 ins; 0 del; 9 mod
6510914: JScrollBar.getMinimumSize() breaks the contract of JComponent.setMinimumSize()
Reviewed-by: abhiscxk, prr
-------------
PR: https://git.openjdk.org/jdk/pull/15325
More information about the client-libs-dev
mailing list