O'Reilly logo

JavaFX 1.2 Application Development Cookbook by Vladimir Vivien

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Displaying data with the ListView control

In rich GUI frameworks, displaying data in a structured list is one of the fundamental GUI controls made available to users. In this recipe, we will discuss how to use the ListView component to collect and display data.

Getting ready

The ListView control is part of the GUI control collection offered by JavaFX in the javafx.scene.control package. If you have not used the JavaFX controls, it may be helpful to review the recipe Creating a form with JavaFX controls for some background information. Some of the code uses JavaFX constructs, such as for-loop expressions. If you need a refresher, review Chapter 1, Getting Started with JavaFX, which covers language fundamentals.

How to do it...

The ListView component ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required