-1

Is there a way I can center the vertical and horizontal scrollbars in a ScrollPane in javafx 8 (by programming/using scenebuilder) so that it is centered from the moment I execute the program?

1 Answers1

0

Use

    scrollPane.setHvalue((scrollPane.getHmax() - scrollPane.getHmin())/2);
    scrollPane.setVvalue((scrollPane.getVmax() - scrollPane.getVmin())/2);
James_D
  • 201,275
  • 16
  • 291
  • 322