JavaFX Tutorial 25 Pagination Java GUI
Source Code :
@Override
public void start(Stage primaryStage) {
primaryStage.setTitle("JavaFX Tutorial / Pagination");
Pagination pagination = new Pagination();
pagination.setPageCount(35);
pagination.setCurrentPageIndex(4);
pagination.setMaxPageIndicatorCount(3);
pagination.setPageFactory((pageIndex)-?{
Label label1 = new Label("Content for page with Index : "+ pageIndex);
label1.setFont(new Font("Arial",36));
Label label2 = new Label("Main Content of Code Amir");
label2.setFont(new Font("Arial" , 20));
return new VBox(label1,label2);
});
VBox vBox = new VBox(pagination);
Scene scene = new Scene(vBox, 800, 600);
primaryStage.setScene(scene);
primaryStage.show();
}
Libraries Importing :
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.Label;
import javafx.scene.control.Pagination;
import javafx.scene.layout.VBox;
import javafx.scene.text.Font;
import javafx.stage.Stage;
The JavaFX Pagination control enables the user to navigate page by page through content, for instance pages of search results, articles, images or similar types of content. The JavaFX Pagination control is represented by the class javafx.scene.control.Pagination. Here is a screenshot of a JavaFX Pagination control:
On this page of the site you can watch the video online JavaFX Tutorial 25 - Pagination Java GUI with a duration of hours minute second in good quality, which was uploaded by the user Code Amir 01 January 1970, share the link with friends and acquaintances, this video has already been watched 1,157 times on youtube and it was liked by 14 viewers. Enjoy your viewing!