On Fri, 27 Nov 2026 12:22:02 GMT, Prasanta Sadhukhan <[email protected]> 
wrote:

> Yes, you are right.. For Nimbus, changing "Nimbus.Overrides" can cause 
> `SynthListUI.updateStyle()` to call `uninstallKeyboardActions()` and 
> `installKeyboardActions()` directly, so it never enters SwingUtilities2 
> helpers so `isChangingUI()` returns false so removal calls clears the 
> application maps. For serialization, JList has its own private 
> `writeObject()` so changing `JComponent.writeObject()` does not affect this 
> call. When `JList.writeObject()` reinstalls the UI, our context is absent. If 
> `List.focusInputMap` is absent, `BasicListUI.installKeyboardActions()` passes 
> null, triggering clearing on the original list being serialized.
> 
> FIx is made to route this 2 flows through SwingUtilities2. A separate 
> regression test is also added to check this missing paths.

`JList` was just one example.

It looks like other components (like `JComboBox`, `JTree`, `JTable`, ...) can 
also lose application key bindings when their `Synth*UI` delegates call 
`updateStyle()` or when `writeObject()` reinstalls the UI and LaF provides no 
input map.

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

PR Comment: https://git.openjdk.org/jdk/pull/34034#issuecomment-7219460171

Reply via email to