title: How do I programmatically send ActionEvent to JButton?
body: <p>How do I programmatically send an <code>ActionEvent</code> (eg button pressed/ACTION_PERFORMED) to a <code>JButton</code>?</p>
  
  <p>I know of:</p>
  
  <pre><code>button.doClick(0);
  </code></pre>
  
  <p>and</p>
  
  <pre><code>button.getModel().setArmed(true);
  button.getModel().setPressed(true);
  button.getModel().setPressed(false);
  button.getModel().setArmed(false);
  </code></pre>
  
  <p>But isn't it possible to directly send it an <code>ActionEvent</code>?</p>
  
  <p>EDIT: This is not production code, it's just a little personal experiment.</p>