> On Aug 28, 2025, at 7:27 PM, Prasanta Sadhukhan <[email protected]> > wrote: > > I understand `ORIENTATION_PROPERTY` is supposedly meant for > horizontal/vertical orientation change but what the code is doing on receipt > of this PropertyChange event is exactly what we want it for > ComponentOrientation change which is to update the layout manager components > > https://github.com/openjdk/jdk/blob/f423e1d9ad37135abacb8deb2d2151e21768a23e/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java#L2170-L2172 > > https://github.com/openjdk/jdk/blob/f423e1d9ad37135abacb8deb2d2151e21768a23e/src/java.desktop/share/classes/javax/swing/plaf/basic/BasicSplitPaneUI.java#L1204-L1211 > > Moreover, `layoutManager` is protected field of `BasicSplitPaneUI` which is > not accessible from JSplitPane
I think you have some choices 1. Generate an property change event that describes a change that did not happen (your current proposal) 2. Define a new property corresponding to the component orientation and generate that event 3. Find a way to allow JSplitPane to update the layout manager (e.g. by adding a public method to SplitPaneUI) 4. Stop caching the components in BasicSplitPaneUI, so that revalidate is sufficient [I don’t know if this is feasible] By the way, I chose your solution for a workaround, but I think a bug fix can and should do better.
