Creating a pagination

Download javafx eBook

Example

Paginations in JavaFX use a callback to get the pages used in the animation.

Pagination p = new Pagination();
p.setPageFactory(param -> new Button(param.toString()));

This creates an infinite list of buttons numbed 0.. since the zero arg constructor creates an infinite pagination. setPageFactory takes a callback that takes an int, and returns the node that we want at that index.

Stats

Contributors: 2
2016-08-04
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook