diff options
Diffstat (limited to 'libjava/classpath/javax/swing/ComponentInputMap.java')
-rw-r--r-- | libjava/classpath/javax/swing/ComponentInputMap.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libjava/classpath/javax/swing/ComponentInputMap.java b/libjava/classpath/javax/swing/ComponentInputMap.java index 28aa8e2..dc4d0bf 100644 --- a/libjava/classpath/javax/swing/ComponentInputMap.java +++ b/libjava/classpath/javax/swing/ComponentInputMap.java @@ -64,7 +64,7 @@ public class ComponentInputMap extends InputMap { if (comp == null) throw new IllegalArgumentException(); - + this.component = comp; } @@ -117,13 +117,13 @@ public class ComponentInputMap extends InputMap if (parentMap != null && !(parentMap instanceof ComponentInputMap)) throw new IllegalArgumentException("ComponentInputMaps can only have " + "ComponentInputMaps for parents"); - - if (parentMap != null && + + if (parentMap != null && ((ComponentInputMap) parentMap).getComponent() != component) - throw new + throw new IllegalArgumentException("ComponentInputMaps' parents must " + "be associated with the same JComponents"); - + super.setParent(parentMap); if (component != null) component.updateComponentInputMap(this); |