Here you can find the source of removeAction(InputMap im, ActionMap am, String name)
protected static void removeAction(InputMap im, ActionMap am, String name)
//package com.java2s; //License from project: Open Source License import javax.swing.Action; import javax.swing.ActionMap; import javax.swing.InputMap; import javax.swing.KeyStroke; public class Main { protected static void removeAction(InputMap im, ActionMap am, String name) { Action a = am.get(name);// w w w . j av a 2 s . co m if (a != null) { KeyStroke ks = (KeyStroke) a.getValue(Action.ACCELERATOR_KEY); if (ks != null) { im.remove(ks); } am.remove(name); } } }