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”

JavaFX 8 with Eclipse Mars

JavaFX 8 is the coolest thing since sliced bread. After installing the 2015 Mars release of Eclipse, the first question I asked was, “Where’s JavaFX 8?”

Don’t worry. Installing the right tooling for Eclipse Mars to develop JavaFX 8 apps is not difficult at all if you download the pre-setup version here. However, if you want to add the JavaFX 8 tooling to an Eclipse that doesn’t have the JavaFX 8 tooling already, things get a little more involved. But still, it really isn’t difficult.

Continue reading “JavaFX 8 with Eclipse Mars”

JavaFX 8 Hello World for Eclipse

Learning JavaFX 8 on Eclipse is simple, once you get past the first Hello World style example. This JavaFX tutorial introduces SceneBuilder, FXML, and JavaFX 8 for Eclipse with an event (an ActionListener) and a controller class.

Believe it or not, I have a JavaFX 8 book that never once explains how to hook up events between a POJO and FXML generated from SceneBuilder—hundreds of pages of how-to material on JavaFX, and not one word on events. Pretty sad.

No such letdown here.

This tutorial demonstrates and explains creating a window that displays a button and a textfield in JavaFX 8, and then hooking them up in Eclipse, using SceneBuilder, so that clicking the button results in the words “Hello World” displaying in the textfield.

Continue reading “JavaFX 8 Hello World for Eclipse”