title: JavaFX 15 TableView not displaying information
body: <p>I am working on a school assignment in Java using JavaFX 15. It's a simple number guessing game, where a random number is generated and the player guesses the number. When the right number is guessed the player can begin a new round or end the game. When the game ends a window displaying some statistics is supposed to appear, showing the round number, the generated number, how many guesses it took, and how long it took.
  I store all these stats in Array Lists as the game plays out. I would like to display this information in a TableView-</p>
  <ul>
  <li>a column for the round number</li>
  <li>a column for the generated number</li>
  <li>a column for the number of guesses it took</li>
  <li>a column for the time it took</li>
  </ul>
  <p>but when the program is run no information appears in the table.</p>
  <p>I created a StatRow class that can be used to add the stats to an ObservableList.</p>
  <pre><code>public class StatRow 
  {
     private SimpleIntegerProperty number, guesses, round, time;
     
     public StatRow (int round, int number, int guesses, int time)
     {
        this.number = new SimpleIntegerProperty(number);
        this.guesses = new SimpleIntegerProperty(guesses);
        this.round = new SimpleIntegerProperty(round);
        this.time = new SimpleIntegerProperty(time);
     }
      //set and get methods here
  }
  </code></pre>
  <p>Here is the controller handling the table creation/population. The formatting is handled in an fxml file. The stage is handled in the main class.</p>
  <pre><code>public class EndController 
  {
     @FXML
     TableView&lt;StatRow&gt; statsReadoutTable;
     @FXML
     TableColumn&lt;StatRow, Integer&gt; roundCol;
     @FXML
     TableColumn&lt;StatRow, Integer&gt; numberCol;
     @FXML
     TableColumn&lt;StatRow, Integer&gt; guessesCol;
     @FXML
     TableColumn&lt;StatRow, Integer&gt; timeCol;
     
     ArrayList&lt;Integer&gt; correctNumber = new ArrayList&lt;&gt;();
     ArrayList&lt;Integer&gt; guessesNumber = new ArrayList&lt;&gt;();
     ArrayList&lt;Integer&gt; roundCount = new ArrayList&lt;&gt;();
     ArrayList&lt;Integer&gt; roundTime = new ArrayList&lt;&gt;();
     
     //initalizes controller with stats arrays
     public void initEndData(ArrayList correct, ArrayList guesses, ArrayList round, ArrayList start)
     { 
        correctNumber = correct;
        guessesNumber = guesses;
        roundCount = round;
        roundTime = start;
     }
     
     //constructor sets table view content
     public EndController()
     {
        numberCol = new TableColumn&lt;&gt;();
        numberCol.setCellValueFactory(new PropertyValueFactory&lt;&gt;(&quot;number&quot;));
        
        guessesCol = new TableColumn&lt;&gt;();
        guessesCol.setCellValueFactory(new PropertyValueFactory&lt;&gt;(&quot;guesses&quot;));
        
        roundCol = new TableColumn&lt;&gt;();
        roundCol.setCellValueFactory(new PropertyValueFactory&lt;&gt;(&quot;round&quot;));
        
        timeCol = new TableColumn&lt;&gt;();
        timeCol.setCellValueFactory(new PropertyValueFactory&lt;&gt;(&quot;time&quot;));
        
        statsReadoutTable = new TableView&lt;&gt;();
        statsReadoutTable.setItems(getStats());
        statsReadoutTable.getColumns().addAll(roundCol, numberCol, guessesCol, timeCol);
     }
     
     //create stats observable list from arrays
     private ObservableList&lt;StatRow&gt; getStats()
     {
        ObservableList&lt;StatRow&gt; stats = FXCollections.observableArrayList();
        int i;
        for(i = 0; i &lt; roundCount.size(); i++)
        {
            stats.add(new StatRow(roundCount.get(i),correctNumber.get(i), 
                    guessesNumber.get(i), roundTime.get(i)));   
        }
        return stats;
     }
  }
  </code></pre>
  <p>I have tried creating the Observable List manually with predetermined data, just to see if my getStats() method was to blame, but it still came up blank.</p>