title: JavaFX: TableView: get selected row cell values
body: <p>I'm working on a project where the TableView looks like this:
  <a href="https://i.stack.imgur.com/C0Cal.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/C0Cal.png" alt="The TableView"></a></p>
  
  <p>The datas are inside are a MySQL database, and I use a modell and an observableArrayList to get them.</p>
  
  <p>I want to make an <strong>initialize</strong> method which read the whole selected Line and save it into the TextFields (like Name-Name, Address - Address etc). I tried with this, and now I can Select the Whole Line data, but can't split it into Strings to set the TextField texts:</p>
  
  <pre><code>ListViewerModell details = (ListViewerModell) table.getSelectionModel().getSelectedItem();
  
  //Checking if any row selected
  if (details != null) {
  //??? - split
  editName.setText("*Name*");
  editAddress.setText("*Address*");
  }
  </code></pre>
  
  <p>Tried with the modell getName(), getAdress() methods but I got NullPointerException and TablePos methods.</p>