if (bindings == null) bindings = new JTextComponent.KeyBinding[0];  Keymap km = JTextComponent.addKeymap(getKeymapName(), JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP)); JTextComponent.loadKeymap(km, bindings, textComponent.getActions()); return km;
return keymap;
  protected Keymap createKeymap()  {    // FIXME: It seems to me that this method implementation is wrong. It seems    // to fetch the focusInputMap and transform it to the KeyBinding/Keymap    // implemenation. I would think that it should be done the other way,    // fetching the keybindings (from prefix + ".bindings") and transform    // it to the newer InputMap/ActionMap implementation.    JTextComponent.KeyBinding[] bindings = null;    String prefix = getPropertyPrefix();    InputMapUIResource m = (InputMapUIResource) UIManager.get(prefix + ".focusInputMap");    if (m != null)      {        KeyStroke[] keys = m.keys();        int len = keys.length;        bindings = new JTextComponent.KeyBinding[len];        for (int i = 0; i < len; i++)          {            KeyStroke curr = keys[i];            bindings[i] = new JTextComponent.KeyBinding(curr,                                                        (String) m.get(curr));          }      }    if (bindings == null)        bindings = new JTextComponent.KeyBinding[0];    Keymap km = JTextComponent.addKeymap(getKeymapName(),                                          JTextComponent.getKeymap(JTextComponent.DEFAULT_KEYMAP));        JTextComponent.loadKeymap(km, bindings, textComponent.getActions());    return km;      }