title: JavaFX TableView how to add items to column?
body: <p>I've working on a GUI that the user can browse text files from the SYSTEM and then when the user press "Start" button the program reading the text file/s, create lists from its data and supposed to add it to <code>TableView</code>. I'm stuck on inserting the data from the lists to the table. I've created the columns names by file names and added it to table:</p>
  
  <pre><code>tblConfigurationSystemColumns.add("Parameter Name");
  tblSystemColumn.stream().map((str) -&gt; str.split("PCM")).forEachOrdered((a) -&gt; {
  tblConfigurationSystemColumns.add(a[0].trim());
          });
  for (int i = 0; i &lt; tblConfigurationSystemColumns.size(); i++) {
      TableColumn col = new TableColumn(tblConfigurationSystemColumns.get(i));
      tableConfigurationSystem.getColumns().addAll(col);        
  }
  </code></pre>
  
  <p>The column names coming from the list <code>tblConfigurationSystemColumns</code>. This list may be changed from each use of the GUI by number of file you browse from the system. (for now let think that we have 2 strings inside: <code>"column1","column2"</code>)</p>
  
  <p>I need to add items to <code>column1</code> from the list <code>SysParameter</code> , and to <code>column2</code> from list <code>SysValues</code>.</p>
  
  <p>How can I add values from each list to each column by rows?
  If you need any more code please tell me (just let you know, the only code that I have it the list creating from the files).</p>
  
  <p><strong><em>EDIT:</em></strong>
  <a href="https://i.stack.imgur.com/h8YVd.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/h8YVd.png" alt="enter image description here"></a></p>
  
  <p>This is what I got after the column building.
  after this I need to get the "Parameter" and the "Value" for each column(as you can see).
  I've made a list that get the "Parameter" from the text file, and another list that get the "Value" from the text file.</p>
  
  <p>how can I put each list to it's column?
  This is the code that build this lists:</p>
  
  <pre><code>            boolean inCESystem = false;
          for (final String line : list) {
      if (line.contains("CE-") &amp;&amp; !(line.contains("CE-system-equipment-pm") || line.contains("inbound") || line.contains("outbound"))) {
          inCESystem = true;
      }
      else if (line.trim().isEmpty()) {
          inCESystem = false;
      }
      else if (inCESystem) {
          CE_System.add(line);
      }
          }
          boolean inCESystemInbound = false;
          for (final String line : list) {
      if (line.contains("CE-") &amp;&amp; (line.contains("inbound")) ) {
          inCESystemInbound = true;
      }
      else if (line.trim().isEmpty()) {
          inCESystemInbound = false;
      }
      else if (inCESystemInbound) {
          CE_System.add("inbound_loadlock - "+line.trim());
      }
          }
          boolean inCESystemOutbound = false;
          for (final String line : list) {
      if (line.contains("CE-") &amp;&amp; (line.contains("outbound")) ) {
          inCESystemOutbound = true;
      }
      else if (line.trim().isEmpty()) {
          inCESystemOutbound = false;
      }
      else if (inCESystemOutbound) {
          CE_System.add("outbound_loadlock - "+line.trim());
      }
          }            
          /*
           * Check the CE list to split each object per parameter and value to different lists
           */
          CE_System.stream().map((str) -&gt; str.split(",")).map((a) -&gt; {
              CE_SystemParameter.add(a[0].trim()); //Parameters
              return a;
          }).forEachOrdered((a) -&gt; {
              if(a.length &gt; 1) {
                  CE_System_Value.add(a[1].trim()); //Values
              } else {
                  CE_System_Value.add(""); //add blank if parameter doesn't have value
              } 
          });
  </code></pre>
  
  <p><strong><em>EDIT 2:</em></strong> Text file example</p>
  
  <pre><code>CE-system:
     No features to set for this item...
  
  CE-system-componentmanager:
     Bootstrap Parallelism                             ,Parallel Bootstrapping
  
  CE-system-components:
     No features to set for this item...
  
  CE-system-components-accessmanager:
     Access control enable                             ,disabled
     Access policy prototyping                         ,enabled
     Access user group                                 ,enabled
     Implicit roles access policy                      ,disabled
     World access policy                               ,disabled
  
  CE-system-components-eqlog:
     EquipmentLog Enable                               ,false
  </code></pre>
  
  <ul>
  <li>Line that contains "CE-" its just title to know that is should be in the "Configuration" Tab.</li>
  <li>each line inside is the "parameter" and the value(after the comma).</li>
  </ul>
  
  <p><strong><em>EDIT 3:</em></strong> The table should look like this example (This example is from my code in Java SWT)
  <a href="https://i.stack.imgur.com/U9w5x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U9w5x.png" alt="enter image description here"></a></p>
  
  <p>Thank you very much guys.</p>