- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create a pagination using JavaFX?
Pagination divides content up between pages and allows users to skip between pages or go in order through the content. You can create pagination by instantiating the javafx.scene.control.Pagination class.
Example
The following Example demonstrates the creation of a Pagination.
import javafx.application.Application; import javafx.geometry.Insets; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.Pagination; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.stage.Stage; public class PaginationExample extends Application { public void start(Stage stage) { //Creating a pagination Pagination pagination = new Pagination(); //Setting number of pages pagination.setPageCount(10); //Creating a vbox to hold the pagination VBox vbox = new VBox(); vbox.setSpacing(5); vbox.setPadding(new Insets(50, 50, 50, 60)); vbox.getChildren().addAll(pagination); //Setting the stage Group root = new Group(vbox); Scene scene = new Scene(root, 595, 200, Color.BEIGE); stage.setTitle("Pagination"); stage.setScene(scene); stage.show(); } public static void main(String args[]){ launch(args); } }
Output
- Related Articles
- How to create a circle using JavaFX?
- How to create a Rectangle using JavaFX?
- How to create a Line using JavaFX?
- How to create a Polygon using JavaFX?
- How to create a Polyline using JavaFX?
- How to create a CubicCurve using JavaFX?
- How to create a QuadCurve using JavaFX?
- How to create a label using JavaFX?
- How to create a separator using JavaFX?
- How to create a Menu using JavaFX?
- How to create a ScrollBar using JavaFX?
- How to create a ListView using JavaFX?
- How to create a TreeView using JavaFX?
- How to create a ComboBox using JavaFX?
- How to create a ColorPicker using JavaFX?

Advertisements