title: JButton array ActionListener
body: <p>In short, I would like to accumulate a bunch of <code>JButton</code>'s to an array, and create one <code>ActionListener</code> class for the array.</p>
  
  <p>I'm trying to create a calculator, and all the numbered buttons, such as "6", are in a <code>JButton</code> array, because I would like to have it input the set number into a temporary int, and it would be easier to create one method, instead of 10. I also have 40 other buttons, that I would like to apply the same principal to, but in a different array, so it would be much faster and easier to put these into a couple of <code>ActionListener</code> methods where the buttons data is implemented to that method.
  this is the code I have:</p>
  
  <pre><code>private JButton num0, num1, num2, num3, num4, num5, num6, num7, num8, num9;
  private JButton numArray[] = {num0, num1, num2, num3, num4, num5, num6, num7, num8, num9};
  
          public GUI(){
            numArray.AddActionListener(new ActionListener(){
               public void actionPerformed(ActionEvent event){
  
               }
         });
    }
  </code></pre>