Wednesday, June 20, 2012

JavaFX 2 UI Controls: Horizontal ListView

This is a tutorial about how to create Horizontal ListView with JavaFX 2. If you have not already seen JavaFX 2: ListView tutorial, then I strongly recommend it, because these are similar tutorials. Only difference between these two tutorials is orientation of ListView. In this tutorial I will setOrientation to Horizontal, instead of default Vertical. Below is the final result of our Horizontal ListView example. Also, here I will implement onMouseClicked Event Handler. Solerman Kaplon commented how bunch of these if and else loops looks awful, and he is right. This can be improved a lot of, but for this kind of beginners tutorials, it's fine.

Horizontal ListView
Horizontal ListView

If you like this tutorial, please feel free to like Facebook page of my blog, to be informed about latest JavaFX 2 tutorials.

0 comments:

Post a Comment