title: (JavaFX) How come my ListView is empty even though the string I'm adding to it is not empty?
body: <p>I have a ListView that can be saved to a text file. The text file is successfully populated but when I try to read from the text file to fill the ListView, nothing appears. Furthermore, to make sure that the text file isn't empty, I print its contents to the console which shows up perfectly. Why aren't the strings appearing in the ListView? Thanks.</p>
  
  <pre><code>    if (event.getSource() == accept0) {
          stage0.close();
          DirectoryChooser chooser1 = new DirectoryChooser();
          chooser1.setTitle("Select Folder");
          File dir1 = chooser1.showDialog(null);
          String line;
  
          if (dir1.isDirectory()) {
              try {
                  BufferedReader br1 = new BufferedReader(new FileReader(dir1.getAbsoluteFile() + "\\ListViewItems.txt"));
  
                  if (!br1.ready()) {
                      br1.close();
                      throw new IOException();
                  }
                  while ((line = br1.readLine()) != null) {
                      items.getItems().add(line); //adding line from text file to ListView
                      System.out.println(line);
                  }
                  br1.close();
  
              } catch (FileNotFoundException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      }
  </code></pre>
  
  <p>Declaration and initialization of the <code>ListView</code> and <code>ObservableList</code></p>
  
  <pre><code>private ObservableList&lt;String&gt; item = FXCollections.observableArrayList();
  private ListView&lt;String&gt; items = new ListView&lt;String&gt;(item);
  </code></pre>