Skip to content

Commit 67c3285

Browse files
hansonrhansonr
authored andcommitted
working on InputMap issues
1 parent ae5cb41 commit 67c3285

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

sources/net.sf.j2s.java.core/src/java/awt/JSComponent.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -477,6 +477,12 @@ public void removeKeyListener(KeyListener l) {
477477
((JSComponentUI)ui).enableJSKeys(false);
478478
}
479479

480+
protected void jsInputMapSet() {
481+
if (ui != null)
482+
((JSComponentUI)ui).enableJSKeys(true);
483+
}
484+
485+
480486

481487
/**
482488
* Invoker must be focusable and could cross from popupmenu to associated component

sources/net.sf.j2s.java.core/src/javax/swing/JComponent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2309,6 +2309,7 @@ final InputMap getInputMap(int condition, boolean create) {
23092309
if (create) {
23102310
InputMap km = new InputMap();
23112311
setInputMap(condition, km);
2312+
jsInputMapSet();
23122313
return km;
23132314
}
23142315
break;

0 commit comments

Comments
 (0)