On Fri, 9 Dec 2022 08:06:43 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> wrote:
> In Swingset2 JInternalFrame demo, focusing on any internalframes and pressing > Ctrl+F7 and then any of up/down/left/arrow key to move the internal frames > results in NPE in NimbusL&F. > It is because `JComponent.processKeyBinding() `calls > `SwingUtilities.notifyAction` which calls > `BasicDesktopPaneUI.actionPerformed` where it gets > `Desktop.minOnScreenInsets` property to get the Insets and then uses > insets.top/bottom/left/right value to move the internalframe but this > property is not defined for Nimbus so deferencing Insets object results in > NPE. > > Fix is added to create a 0 insets incase some L&F do not define` > Desktop.minOnScreenInsets` property. > No regression test is added as it can be easily checked by SwingSet2 > JInternalFrame demo. This pull request has now been integrated. Changeset: 7465de45 Author: Prasanta Sadhukhan <psadhuk...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/7465de453afac9499582cb8c7573bcdc988f623b Stats: 138 lines in 2 files changed: 138 ins; 0 del; 0 mod 6603771: Nimbus L&F: Ctrl+F7 keybinding for Jinternal Frame throws a NPE. Reviewed-by: abhiscxk, serb ------------- PR: https://git.openjdk.org/jdk/pull/11605