title: JAVAFX: update a listview with image + text
body: <p>I am trying to create a simple chess game with javafx.
  I have 2 listview filled with images and a counter near each image, which represent the counter of each piece that is removed from the chessboard.
  Is there a way to update the counter of an image?
  This is the code I ued to create the starting list, with al the pieace with 0x counter.</p>
  
  <pre><code>        lista2.setCellFactory(listview -&gt; new ListCell&lt;String&gt;() {
          private ImageView imageView = new ImageView();
          @Override
          public void updateItem(final String item, final boolean empty) {
              Image img = null;
              super.updateItem(item, empty);
              if (empty) {
                  setGraphic(null);
              } else {
                  try(InputStream is = Files.newInputStream(Paths.get(GameView.RESFOLDER + item + GameView.FORMAT))){
                      img = new Image(is);                
                  } catch(IOException e) {
                      System.out.println("Couldn't load image" + Paths.get(GameView.RESFOLDER + item + GameView.FORMAT));
                  }        
                  // true makes this load in background
                  // see other constructors if you want to control the size, etc 
                  imageView.setImage(img);
                  setGraphic(imageView);
                  setText("x0");
              }
          }
      });
  </code></pre>