title: Count how many times a JButton is pressed?
body: <p>In the action performed code in a JAVA GUI, how would I count how many times a button is pressed, and do something different for each press of the button?</p>
  
  <pre><code>  private class Listener implements ActionListener
    {
       public void actionPerformed (ActionEvent e)
       {
  
         HOW WOULD I COUNT HOW MANY TIMES THIS BUTTON HAS BEEN PRESSED?
  
       }
  </code></pre>
  
  <p>Thanks!!!</p>