RFR: 8356594: JSplitPane loses divider location when reopened via JOptionPane.createDialog() [v2]
Sergey Bylokhov
serb at openjdk.org
Thu May 22 19:48:53 UTC 2025
On Wed, 21 May 2025 08:32:46 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:
> Now if we call setDividerLocation it will set [dividerLocationIsSet](https://github.com/openjdk/jdk/blob/91194517c75a96fe7bcc2dcf5e9c42af9cf5975a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java#L1029) so even if `doReset `is true, it will not call `resetToPreferredSizes` but sets correct [divider location](https://github.com/openjdk/jdk/blob/91194517c75a96fe7bcc2dcf5e9c42af9cf5975a/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java#L1436)
I am looking into this.
Just one unrelated question, why did we implemented in a way so we add and delete the left/right comps even if the orientation is not changed?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/25294#issuecomment-2902381713
More information about the client-libs-dev
mailing list