On Wed, 20 Jul 2022 09:12:38 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> Setting JSplitPane divider size to negative value leads to unexpected results 
> and is not desirable and seems to be not practical.
> I guess we should return IAE but it might break existing app so fixed to 
> clamp it to 0 incase negative value is tried to be set for divider size.

src/java.desktop/share/classes/javax/swing/JSplitPane.java line 427:

> 425:             = "The size of the divider.")
> 426:     public void setDividerSize(int newSize) {
> 427:         if (newSize < 0) {

What are the "unexpected results" of < 0 ?
Should it perhaps be 1 ? 
And what about this ?
https://docs.oracle.com/en/java/javase/17/docs/api/java.desktop/javax/swing/plaf/basic/BasicSplitPaneDivider.html#setDividerSize(int)

And we need a CSR ...

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

PR: https://git.openjdk.org/jdk/pull/9566

Reply via email to