Here you can find the source of unregisterKeyBoardAction(JComponent comp, Action action)
public static void unregisterKeyBoardAction(JComponent comp, Action action)
//package com.java2s; //License from project: Open Source License import javax.swing.Action; import javax.swing.JComponent; import javax.swing.KeyStroke; public class Main { public static void unregisterKeyBoardAction(JComponent comp, Action action) { unregisterKeyBoardAction(comp, action, JComponent.WHEN_IN_FOCUSED_WINDOW); }//from www. j av a 2 s . c o m public static void unregisterKeyBoardAction(JComponent comp, Action action, int condition) { comp.getInputMap(condition).remove((KeyStroke) action.getValue(Action.ACCELERATOR_KEY)); comp.getActionMap().remove(action.getValue(Action.NAME)); } }