How-To's > How do I create a cover flow?
Cover flows enable the user to quickly browse through a larger selection to identify items of interest.

In some cover-flow implementations, the user can click any image to bring it to the foreground in the center. In other implementations, the user clicks forward and back buttons to change the foreground item.
Use this widget when the choices are visually distinct, such as images, album art, or web pages. Choosing between a carousel, a flat carousel, and a cover flow is often a matter of what suits your application from an aesthetic point of view.
To create a cover flow in JavaFX, start with the code from one of the following samples and modify it to suit your purposes.
Examples
- 3-D Display Shelf With the PerspectiveTransform
A sample demonstrating a simple example of a cover flow.

The user can click any photo to bring it to the foreground. This sample uses thePerspectiveTransformclass to achive the 3-D appearance of the rectangular photos in the background. - Modifying Display Shelf for Mobile Devices
Shows how to modify the 3-D Display Shelf sample to work on mobile devices. - JFXtras Shelf Control

An advanced sample showing how to implement a cover flow. Includes a screencast. The features include image titles, a scrollbar, the ability to enable or disable a reflection, configurable aspect ratio, and image caching of images that are off-screen.
Related How-To Topics
Last Updated: April 2010
[Return to How-To's Home]