A simple demo project presenting a specialized implementation of javafx.scene.layout.FlowPane
that allows content to be dynamically centered (unlike original FlowPane/TilePane). Core ItemPane
class is located in itempanedemo.layout
package.
Tested on JDK 20 & JavaFX 20.
This implementation calculates items position dynamically based on itemWidth
provided via constructor (250 px is chosen if not provided). That means, to ensure correct positioning, all items contained in ItemPane
should be sized equally to itemWidth
. Feel free to reimplement it.