import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Pagination; import javafx.scene.layout.Pane; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class VBoxPaginationApp extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { VBox container = new VBox(4); container.setStyle("-fx-border-color: darkgray;"); container.setPrefSize(180, 190); Pagination pagination = new Pagination(); pagination.setMaxPageIndicatorCount(3); container.getChildren().add(pagination); Scene scene = new Scene(new Pane(container), 600, 400); stage.setScene(scene); stage.setTitle(System.getProperty("javafx.userAgentStylesheetUrl")); stage.show(); } }