title: Java buttons: adding an ActionListener
body: <p>I have a superclass <code>Car</code>, and two classes that extend <code>Car</code> (<code>CarToRent</code>, and <code>CarToSell</code>)
  In class <code>CarCompany</code> I implement a GUI in the constructor. </p>
  
  <p>I have a button:</p>
  
  <pre><code>addCarToRentButton = new JButton("Add Car To Rent");
  contentPane.add(addCarToRentButton);
  addCarToRentButton.addActionListener(this);
  </code></pre>
  
  <p>How do I add an action listen to this so that when the button is clicked, it enters data from 3 text fields into an array of <code>Car</code> class? (the text fields are <code>dailyRateTextField</code>, <code>descriptionTextField</code> and <code>downPaymentTextField</code>).</p>