import java.io.IOException;
import java.util.stream.IntStream;

import javafx.application.Application;
import javafx.application.Platform;
import javafx.beans.property.SimpleObjectProperty;
import javafx.scene.Scene;
import javafx.scene.control.SelectionMode;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.stage.Stage;

public class Main extends Application {


    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) throws IOException {
        TableView<String> tableView = new TableView();

        TableColumn<String, Object> tableColumn = new TableColumn<>("fuu");
        tableColumn.setCellValueFactory(param -> new SimpleObjectProperty<>("fuu"));

        tableView.getColumns().add(tableColumn);

        IntStream.range(0, 100).forEach(t -> tableView.getItems().add("fuu"));

        tableView.getSelectionModel().setCellSelectionEnabled(true);
        tableView.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);
        tableView.getSelectionModel().selectFirst();

        primaryStage.setScene(new Scene(tableView));

        primaryStage.show();

        Platform.runLater(() -> tableView.requestFocus());
    }
}
