![]() |
The Java Developers Almanac 1.4Order this book from Amazon. |
e863. Adding an InputMap to a ComponentInputMap inputMap = new InputMap(); // Add a KeyStroke inputMap.put(KeyStroke.getKeyStroke("F2"), "actionName"); inputMap.setParent(component.getInputMap(JComponent.WHEN_FOCUSED)); component.setInputMap(JComponent.WHEN_FOCUSED, inputMap);
e859. Converting a KeyStroke to a String e860. Listing the Key Bindings in a Component e861. Sharing an InputMap or an ActionMap Between Two Components e862. Finding a Key Binding in a Component © 2002 Addison-Wesley. |