Pagination Pagination pagination = new Pagination(); pagination.setPageCount(20); pagination.setMaxPageIndicatorCount(10); pagination.setCurrentPageIndex(5); //设置样式 pagination.getStyleClass().add(Pagination.STYLE_CLASS_BULLET); pagination.setPageFactory(new Callback<Integer, Node>() { @Override public Node call(Integer param) { Label label = new Label("页面" + (param + 1)); label.setTextFill(Paint.valueOf("#0cc")); label.setStyle("-fx-background-color: #ccc"); label.setPrefWidth(200); label.setPrefHeight(200); label.setFont(Font.font(30)); label.setAlignment(Pos.CENTER); return label; } });