title: How to fix this error: cannot find symbol - method setText(java.lang.String)
body: <p>I am making a seat monitoring system using java PL. I have this method in my ComputerSeats class:</p>
  
  <pre><code>public void occupySeat()
  {
      seatOccupied[station-1] = true;
      mtr.showArrayIdVal().setText(stud.showField().getText());
      seat[station-1].setBackground(Color.red);
      occupiedSeatCounter++;
  }
  </code></pre>
  
  <p>the ShowArrayIdVal contains a <code>Jlabel[] object</code>, the value of this label is "Vacant Station", I used <code>setText(stud.showField().getText())</code> to change "Vacant Station" to the value that I have inputted using <code>JTextField</code>. But then, whenever I compile it, It contains an error which states that it cannot find <code>settext()</code>.</p>