
Thus any binding specified by the developer is maintained across different look and feel. Anytime the look and feel is changed, the parent is reset. Each InputMap/ ActionMap has a parent that typically comes from UI. InputMap and ActionMap both are just tables or maps where first one binds key strokes by means of KeyStroke objects to action names and second one specifies actions corresponding to each action name. For each JComponent control we can extract the corresponding InputMap and ActionMap.

Using Keymap or InputMap and ActionMap combination, it is easier to map the action to a specific key stroke and thus key binding is achieved. Places where KeyListener is used in order to map key input to some action, it is more convenient and preferred from usimg Keymap or InputMap and ActionMap combination instead.
