title: Selected item in ListView hides JavaFX
body: <p>I have a <strong>ListView</strong> and I add <strong>BorderPane elements</strong> with some content.</p>
  
  <hr>
  
  <p>When I select one item, it hides.</p>
  
  <p>How can I fix this?</p>
  
  <p><a href="http://i.stack.imgur.com/la6kS.png" rel="nofollow">The white item is the selected item. Is hidden.</a></p>
  
  <p>I have no CSS for nothing in the listView</p>
  
  <blockquote>
    <p>UPDATE:</p>
  </blockquote>
  
  <p><em>BorderPane content</em></p>
  
  <pre><code>public BorderPane getUserBox()
  {
      BorderPane borderPane = new BorderPane();
  
      HBox mainPane = new HBox();
  
  
      mainPane.prefWidthProperty().bind(borderPane.prefWidthProperty());
      mainPane.minWidthProperty().bind(borderPane.minWidthProperty());
      mainPane.maxWidthProperty().bind(borderPane.maxWidthProperty());
  
      ImageView image = new ImageView(Images.CLOSE_ICON);
  
      Label nick = new Label("  Name");
      Label text = new Label("  Text ");
  
      VBox vBox = new VBox();
      vBox.getChildren().addAll(nick, text);
  
      Label time = new Label("   4.06.2016");
  
      mainPane.getChildren().addAll(image, vBox, time);
  
      borderPane.getStyleClass().add("userBox");
  
      borderPane.setCenter(mainPane);
  
      return borderPane;
  }
  </code></pre>
  
  <p><em>Adding the borderPane</em></p>
  
  <pre><code>    UserBox userBox = new UserBox();
  
      ObservableList&lt;BorderPane&gt; items =FXCollections.observableArrayList (
      userBox.getUserBox(), userBox.getUserBox(), userBox.getUserBox(),    userBox.getUserBox());
  
      listUsersBox.setItems(items);
  </code></pre>
  
  <p><em>I only have this css in the borderPane</em></p>
  
  <pre class="lang-css prettyprint-override"><code>.userBox {
  
      -fx-background-color: green;
  
  }
  </code></pre>