title: different buttons perform different actions
body: <p>I'm trying to run an experiment and I can't seem to find anywhere that offers any help. </p>
  
  <p>My experiment is a set of multiple buttons that each print a separate line of text in a text box on a SwingView. </p>
  
  <p>I have multiple buttons, but each button is leading to the same ActionListener. </p>
  
  <pre><code>import javax.swing.*;
  import java.awt.*;
  import java.awt.event.*;
  
  public class TextArea1 implements ActionListener{
  JTextArea text;
  int numClick = 0;
  
  public static void main(String[] args){
      TextArea1 gui = new TextArea1();
      gui.go();
      }
  
  public void go(){
      JFrame aFrame = new JFrame();
  
      JPanel aPanel = new JPanel();
      JPanel aPanel2 = new JPanel();
      JPanel aPanel3 = new JPanel();
      JPanel aPanel4 = new JPanel();
      JPanel aBoard = new JPanel();
  
      JButton aButton = new JButton("Just Click it");
      JButton aButton1 = new JButton("1");
      JButton aButton2 = new JButton("2");
      ...
      JButton aButton9 = new JButton("9");        
  
      aPanel2.setBackground(Color.darkGray);
      aPanel3.setBackground(Color.darkGray);
      aPanel4.setBackground(Color.darkGray);
      aBoard.setLayout(new GridLayout(3,3));
  
      aBoard.add(aButton1);
      aBoard.add(aButton2);
      ...
      aBoard.add(aButton9);
  
      aButton.addActionListener(this);
      aButton1.addActionListener(this);
      aButton2.addActionListener(this);
      ...
      aButton9.addActionListener(this);
  
      text = new JTextArea(3,20);
      text.setLineWrap(true);
  
      JScrollPane scroller = new JScrollPane(text);
      scroller.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
      scroller.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
  
      aPanel.add(scroller);
  
      aFrame.getContentPane() .add(BorderLayout.EAST, aPanel2);
      aFrame.getContentPane() .add(BorderLayout.WEST, aPanel3);
      aFrame.getContentPane() .add(BorderLayout.NORTH, aPanel4);
      aFrame.getContentPane() .add(BorderLayout.SOUTH, aPanel);
      aFrame.getContentPane() .add(BorderLayout.CENTER, aBoard);
  
      aFrame.setSize(350,300);
      aFrame.setVisible(true);
      }
  
  public void actionPerformed(ActionEvent ev){
      numClick++;
      text.append("button clicked " + numClick + "time(s) \n");
      }
  }
  </code></pre>
  
  <p>This is what i've written so far. I've gotten the code to print out new text every time a button is clicked. but the code doesn't differentiate between each button, so it doesn't matter if it's button1 or button2, the same situation happens</p>