List of usage examples for javax.swing JComponent registerKeyboardAction
public void registerKeyboardAction(ActionListener anAction, KeyStroke aKeyStroke, int aCondition)
getActionMap() and getInputMap() for similar behavior. From source file:org.executequery.gui.browser.FindAction.java
public void install(JComponent component) { this.component = component; component.registerKeyboardAction(this, INVOKE_KEY_STROKE, JComponent.WHEN_IN_FOCUSED_WINDOW); // comp.registerKeyboardAction(this, KeyStroke.getKeyStroke('I', // KeyEvent.CTRL_MASK | KeyEvent.SHIFT_MASK), // JComponent.WHEN_FOCUSED); }