Index: src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java =================================================================== --- src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java (revision 509144) +++ src/main/java/common/javax/swing/plaf/basic/BasicInternalFrameUI.java (working copy) @@ -485,6 +485,7 @@ private boolean keyBindingRegistered; public BasicInternalFrameUI(final JInternalFrame frame) { + this.frame = frame; } public void setWestPane(final JComponent c) { @@ -698,7 +699,9 @@ if (keys == null) { return; } - + if (frame == null) { + throw new NullPointerException(); + } InputMap map = LookAndFeel.makeComponentInputMap(frame, keys); SwingUtilities.replaceUIInputMap( frame, JComponent.WHEN_IN_FOCUSED_WINDOW, map);