c.getActionMap().put("pressed", new AbstractAction() { public void actionPerformed(ActionEvent e) { AbstractButton button = (AbstractButton) e.getSource(); ButtonModel model = button.getModel();  model.setArmed(true); model.setPressed(true); } });  c.getActionMap().put("released", new AbstractAction() { public void actionPerformed(ActionEvent e) { AbstractButton button = (AbstractButton) e.getSource(); ButtonModel model = button.getModel();  model.setPressed(false); model.setArmed(false); } });
  public void installKeyboardActions(JComponent c)  {  }