I\'m having some problem regarding the default background and border of the ScrollPane. Using this style made the problem clearer to see.
setStyle(\"-fx-back
Rather than use FXML or CSS I prefer to consume the event, but this only works on the portion that has content. If your scrollPane is larger than its content you also have to fill the remaining space.
scrollPane.getContent().setOnMousePressed(Event::consume);
scrollPane.setFitToHeight(true);
scrollPane.setFitToWidth(true);