Usually for ScrollPaneyou do something like this:
scrollPane.setHbarPolicy(ScrollBarPolicy.NEVER);
scrollPane.setVbarPolicy(ScrollBarPolicy.NEVER);
However, the scrollbars inside the WebView are not your JavaFX UI control, but part of the displayed web page. So you control it with CSS:
body {
overflow-x: hidden;
overflow-y: hidden;
}
You can save this as .css and apply it as a user style sheet, similar to the user style sheet in regular browsers using this code:
webView.getEngine().setUserStyleSheetLocation("path/to/style.css");
, :
webView.getEngine().setUserStyleSheetLocation(getClass().getResource("/path/to/style.css").toExternalForm());