import javafx.application.Application;
import javafx.geometry.Insets;
import javafx.scene.Scene;
import javafx.scene.control.TreeItem;
import javafx.scene.control.TreeTableColumn;
import javafx.scene.control.TreeTableView;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;

public class TreeTableBug extends Application {
    public static void main(String[] args) {
        TreeTableBug.launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        TreeTableView<String> table = new TreeTableView<>();
        TreeTableColumn<String, String> column = new TreeTableColumn<>();
        column.setPrefWidth(100);
        column.setCellValueFactory(f -> f.getValue().valueProperty());
        table.getColumns().add(column);
        table.setPadding(new Insets(20));

        TreeItem<String> rootItem = new TreeItem<>("root");
        rootItem.getChildren().addAll(new TreeItem<>("A"), new TreeItem<>("B"));
        table.setRoot(rootItem);

        StackPane root = new StackPane();
        root.getChildren().add(table);
        Scene scene = new Scene(root, 300, 200);
        scene.getStylesheets().add(getClass().getResource("/tree-table.css").toExternalForm());
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}

