JavaFX TableView Explanation

JavaFX TableViews are for editing and displaying data. Think of the TableView as a very raw spreadsheet for JavaFX. If you are familiar with the TableView from Swing or another windowing toolkit, then you’re well on your way to understanding the JavaFX TableView.

If you are looking for a tutorial with JavaFX TableView code, check out my Simple JavaFX TableView Example. This post has more to do with explaining how basic TableViews fit together. Think of it as a companion to the Simple JavaFX TableView Example. I wrote this post, because just looking at a JavaFX TableView example is not nearly enough for the learning programmer to understand everything going on. JavaFX TableViews have a steep learning curve to put it mildly. Don’t feel bad if you’re having a hard time wrapping your mind around the TableView in JavaFX. It takes a little getting use to.

In JavaFX, all tables are enclosed in TableViews objects. If you’ve done a little JavaFX already, you could think of JavaFX TableViews as scenes for holding TableColumns. JavaFX TableColumns in turn are associated with specialized data objects called ObservableLists.

Continue reading “JavaFX TableView Explanation”

Simple JavaFX TableView Example

JavaFX TableViews are perfect for making spreadsheets or just displaying data. In JavaFX, TableViews are a little trickier than normal UI elements, because you are dealing with data, and data can come and go as you use your application. This tutorial goes over setting up your first JavaFX TableView and populating it with custom data.

javafx_tableview_example
Typical JavaFX TableView in use.

Continue reading “Simple JavaFX TableView Example”

JavaFX Button Example

Let’s say that you want to display multiple buttons and have different actions take place because of them. Buttons in JavaFX are just as important as in other UI toolkits. Here is a tutorial giving an example of two JavaFX buttons changing the text of a JavaFX TextField.

If you are brand new to JavaFX, be sure to go through the JavaFX tutorial I wrote a while back. This tutorial assumes you are using Eclipse. Continue reading “JavaFX Button Example”