问题
This is usually done in JavaScript/ JQuery. I'd like an implementation in Java/ JavaFx.
A bit more details:
I have a gallery of pictures I'd like to list, first as small 32 * 32, then when a user clicks on one of the 32 * 32 icons, a larger one of the clicked should appear on another pane.
The problem I have is listing them horizontally so that a user could use Left-Right navigation arrows on either edge to show other new pictures not yet in view (more 32 by 32 picture icons become visible as others slide out of view either to the Left or Right), so I don't think that TableView's the best way to go.
I'd like something like this:

Please help me on how I could implement this? Thank you in advance....
回答1:
Take a look at the DisplayShelf example from the Java 8 Ensemble 8 sample application.
The sample is more complex than what you need, but you could probably learn from it, simplify it and adapt it for your work.
The Ensemble 8 application is in the Java 8 Demos and Samples download for Java 8, so you can easily download and run it (use java -jar Ensemble8.jar
) out of the demo/javafx_samples
directory. Then search for DisplayShelf from within the Ensemble 8 application.

来源:https://stackoverflow.com/questions/22708506/how-to-display-a-gallery-of-small-picture-icons-in-a-left-right-horizontal-navig