Friday, December 11, 2015

JavaFX Tableview

In this very short blogpost I'll present you an example for the usage of the JavaFX tableview component.

A JavaFX TableView Screenshot

Yes, the app does not much - it displays some random data in a javafx TableView control. 

The interesting thing maybe is how the table columns are initialized:


I think it is quite obvious what is going on - the columns are somehow connected to the properties of ... erm ... the row entries.

More often than not this is what you want from a tableview, just display some data. 

Consulting javadocs for TableView or TableColumn never hurts, but sometimes it can be a little bit hard to get the big picture, especially when you don't have much experience with JavaFX.

The abstractions provided here help you to display some data quickly (in terms of development time) and can be reused in various scenarios. A self contained project is hosted on my github site, but for the impatient i'll repost the essential parts here as a gist:




Thanks for reading.





No comments:

Post a Comment