title: Writing data to JavaFX Tableview
body: <p>I have never used tableview before and I am quite new to with Java and JavaFX.  I tried to mirror an example but since the data is coming from a db client created in house I couldn't copy it exactly.  Anyway, my data is going into the table but its entering as what looks like a csv data and each column is not getting put into its respective column.  Here is a screenshot to clarify my question: </p>
  
  <p><a href="https://i.stack.imgur.com/Rgilk.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Rgilk.jpg" alt="enter image description here"></a>                   </p>
  
  <p>Getting columns here</p>
  
  <pre><code>   for (Column col : drs.getColumns()){
          TableColumn tblCol = new TableColumn(col.getName());
          tblCol.setCellValueFactory(new Callback&lt;CellDataFeatures&lt;ObservableList,String&gt;,ObservableValue&lt;String&gt;&gt;(){
              public ObservableValue&lt;String&gt; call(CellDataFeatures&lt;ObservableList, String&gt; p) {
                  return new SimpleStringProperty(p.getValue().toString());
              }
          });
           table.getColumns().addAll(tblCol);
      }
  </code></pre>
  
  <p>Getting the rows here:</p>
  
  <pre><code>while (drs.hasNextRow()) {
      ObservableList&lt;String&gt; row = FXCollections.observableArrayList();
      for (int i = 0; i &lt; drs.getColumns().length; i++) {
          row.add(drs.getNextRow().getItem(i) + "");
      }
      data.add(row);
  }
  </code></pre>
  
  <p>And here is where I fail at sending the data to the table.</p>
  
  <pre><code>table.setItems(data);
  System.out.println("dis is data: " +data);
  </code></pre>
  
  <p>the data prints like so:</p>
  
  <pre><code>dis is data: [[data, data, data....], [data, data, data....], [data, data, data....]]
  </code></pre>
  
  <p>It takes each [row] and puts it into each column for each record.  I am assuming I need the data to look like:</p>
  
  <pre><code>[[data], [data], [data]....[data]], [[data], [data], [data]....[data]], [[data], [data], [data]....[data]]
  </code></pre>
  
  
  
  <pre><code>    } catch(Exception e){
          e.printStackTrace();
          System.out.println("everything is broken");
      }
  }
  </code></pre>
  
  <p>So, I am lost.  I don't know what I am doing and I'd appreciate any help that you can offer me.</p>