Example usage for javax.swing ActionMap put

List of usage examples for javax.swing ActionMap put

Introduction

In this page you can find the example usage for javax.swing ActionMap put.

Prototype

public void put(Object key, Action action) 

Source Link

Document

Adds a binding for key to action.

Usage

From source file:wsattacker.plugin.intelligentdos.ui.dialog.ConfigureCommonParams_NB.java

private void configureKeyBinding() {
    InputMap inputMap = commonParamTable.getInputMap(JTable.WHEN_FOCUSED);
    ActionMap actionMap = commonParamTable.getActionMap();

    inputMap.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), DELETE);
    actionMap.put(DELETE, new AbstractAction() {
        @Override/*from   ww w.ja  va2 s.co  m*/
        public void actionPerformed(ActionEvent evt) {
            removeRow();
        }
    });
}