title: Calling a Java AbstractAction from a button/mouse release
body: <p>In a simple calculator app, I use abstract actions to handle the buttons being clicked with the mouse and the respective number pad keys (with key bindings) being pressed. I wanted certain cosmetic changes to occur upon using the keyboard, such as changing the border of JButton number 1 when I press the number 1 key. And changing it back upon release. This all works. Then I went and started pressing the JButtons with my mouse again and realized that the key released action never gets invoked, obviously because I'm not using the keybinding. So my question is, is there a way to invoke the appropriate released abstract action when the mouse release/button raises?</p>
  
  <p>When I discovered this, I initially tried this:</p>
  
  <pre><code>Abstract action(){
  set border to this..
  code..
  code..
  code..
  set border to this..
  }
  </code></pre>
  
  <p>So no matter if the key or the mouse, it would change. However it doesn't change, or probably goes so fast it's undetectable.</p>
  
  <p>It doesn't make sense to register a mouse listener in this instance. I tried this anyway and I cannot seem to register the abstract action as a mouse listener.</p>
  
  <p>Thanks for your input and ideas.</p>
  
  <p>I register actionlistener:</p>
  
  <pre><code>    btnMultiplication.addActionListener( operatorAction );
      btnDivision.addActionListener( operatorAction );
      btnAddition.addActionListener( operatorAction );
      btnSubtraction.addActionListener( operatorAction );
      btnSix.addActionListener( numberAction );
      btnSeven.addActionListener( numberAction );
      btnEight.addActionListener( numberAction );
  </code></pre>
  
  <p>the *Action's are abstract actions</p>
  
  <p>I use this for keyboard input</p>
  
  <pre><code>im.put( KeyStroke.getKeyStroke( KeyEvent.VK_NUMPAD0, 0, false ), "Number" );
  im.put( KeyStroke.getKeyStroke( KeyEvent.VK_NUMPAD0, 0, true ), "Number Released" );
  am.put( "Number", numberAction );
  am.put( "Number Released", numberActionR );
  </code></pre>
  
  <p>I used the <strong>Number</strong> action to change the border of the respective jbutton. Then I use <strong>Number Released</strong> to change the border again.</p>
  
  <p>Obviously, when I click with the mouse, the border highlights. But the <strong>Number Released</strong> doesn't invoke. Like I stated, eliminating the released aspect all together and putting the first border change at the start of the <strong>abstract action</strong> and then the final border change at the end of the <strong>abstract action</strong> evidently goes so fast you cannot see the border change.</p>