title: JavaFX tabbed pane with a table view on each tab?
body: <p>I have a tabbed pane, with a table on each tab. I add different items to the tables and I just want each tab to show me the respective items of that table. But nothing shows up.
  When I debug I can clearly see the tab pane, that contains the tabs, that contains the table views, that contain the right items. </p>
  
  <p>Why does this not work?!</p>
  
  <p>Thanks!</p>
  
  <pre><code>  primaryStage.setTitle("TEST");
    Group root = new Group();
    Scene scene = new Scene(root, 400, 300, Color.WHITE);
  
    TableView tv1 = new TableView();
    TableView tv2 = new TableView();
  
    TableColumn&lt;String, String&gt; clmn = new TableColumn&lt;&gt;("Test");
    clmn.setPrefWidth(230);
  
    tv1.getColumns().addAll(clmn);
    tv2.getColumns().addAll(clmn);
  
    List&lt;String&gt; firstItems = new ArrayList&lt;&gt;();
    firstItems.add("ONE");
    firstItems.add("TWO");
    firstItems.add("THREE");
    tv1.setItems(FXCollections.observableArrayList(firstItems));
  
    List&lt;String&gt; secondItems = new ArrayList&lt;&gt;();
    secondItems.add("1");
    secondItems.add("2");
    secondItems.add("3");
    tv2.setItems(FXCollections.observableArrayList(secondItems));
  
    TabPane tabPane = new TabPane();
    BorderPane mainPane = new BorderPane();
  
    //Create Tabs
    Tab tabA = new Tab();
    tabA.setText("Tab A");
    tabA.setContent(tv1);
    tabPane.getTabs().add(tabA);
  
    Tab tabB = new Tab();
    tabB.setText("Tab B");
    tabB.setContent(tv2);
    tabPane.getTabs().add(tabB);
  
    mainPane.setCenter(tabPane);
    mainPane.prefHeightProperty().bind(scene.heightProperty());
    mainPane.prefWidthProperty().bind(scene.widthProperty());  
    root.getChildren().add(mainPane);
    primaryStage.setScene(scene);
    primaryStage.show();
  </code></pre>
  
  <p>Empty:</p>
  
  <p><img src="https://i.stack.imgur.com/a0tZP.png" alt="enter image description here"></p>