title: How to list arrays?
body: <p>This is my first time creating a program using array lists and I have come to a small problem. A small description of code...you list an employee's info (ID#, names, date started, salary etc) and it outputs in the "employeeTArea".</p>
  
  <pre><code>public class EmployeeView extends FrameView {
  /** Define the ArrayList */
  ArrayList &lt;String&gt; inventory = new ArrayList &lt;String&gt;();
  
  public EmployeeView(SingleFrameApplication app) {
  
  }// &lt;/editor-fold&gt;
  
  private void AddActionPerformed(java.awt.event.ActionEvent evt) {
  
      String c;
      String ID, firstName, lastName, annualSal, startDate;
  
      ID = IDField.getText();
      firstName = firstNameField.getText();
      lastName = lastNameField.getText();
      annualSal = annualSalField.getText();
      startDate = startDateField.getText();
  
      c = new String (ID);
      c = new String (firstName);
      c = new String (lastName);
      c = new String (annualSal);
      c = new String (startDate);
      inventory.add(c);
  }
  
  private void ListActionPerformed(java.awt.event.ActionEvent evt) {
  </code></pre>
  
  <p>The problem is here just below...though you may not see it everything after get(x) (firstName, lastName, ID etc etc) is underlined red. Just those words. Of course this creates a problem for after I store employee information in array by pressing the "addButton", I can no longer access that information when I press the "listButton" for it to display.</p>
  
  <pre><code>    String temp="";
  
      for (int x=0; x&lt;=inventory.size()-1; x++) {
          temp = temp + inventory.get(x).ID + " "
                  + inventory.get(x).firstName + " "
                  + inventory.get(x).lastName + " "
                  + inventory.get(x).annualSal + " "
                  + inventory.get(x).startDate + "\n";
      }
      inventoryOut.setText(temp);
  
      class Company {
      String ID, firstName, lastName, annualSal, startDate, mileage;
  
      Company (String _ID, String _firstName,String _lastName, String _annualSal, String _startDate) {
          ID = _ID;
          firstName = _firstName;
          lastName = _lastName;
          annualSal = _annualSal;
          startDate = _startDate;
      }
  }
  </code></pre>
  
  <p>}</p>