Skip to content

Introduction to Graphical User Interfaces with JavaFX and SceneBuilder (Video)

Learn how to build a graphical user interface with JavaFX, NetBeans and Scene Builder in this video tutorial, with the full example project to download.

Wikipedia: JavaFX is a family of products and technologies from Sun Microsystems, acquired by Oracle Corporation, for creating Rich Internet Applications (RIAs), that is, web applications that have the features and capabilities of desktop applications, including interactive multimedia applications. The technologies included under the JavaFX name are JavaFX Script and JavaFX Mobile, although more JavaFX products are planned.

In this tutorial we are going to build a small example application that shows how to use the tools for creating graphical interfaces with JavaFX. These tools are the "NetBeans" IDE and the "Scene Builder" tool, which let you design the interface visually and produce an XML file (FXML) as a result. That file will be the "View" class in the MVC (Model-View-Controller) pattern. In JavaFX you can also build interfaces through code, the way you did in Swing and AWT, but the approach explained in the video tutorial is an easier one (which doesn’t mean at all that it’s better than the others).

The graphical interface built in this example looks like this:

Screenshot of the sample JavaFX interface: name and surname fields, birth year, a Show button and the entered data

You can download the project built in the video tutorial HERE.

You can download NetBeans HERE.

You can download Scene Builder HERE. (As of November 2012, downloading version 1.0 is recommended.)

You can see examples of what you can do with JavaFX on the following page by clicking HERE. These examples are built with code, not with FXML, although with a bit of practice it’s easy to build them in FXML too.

The following video shows the process of creating a JavaFX project with the tools mentioned above:

“Introduction to Graphical User Interfaces with JavaFX and SceneBuilder (Video)” by Ricardo Moya at jarroba.com, licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0. Registered at Safe Creative.

Ricardo Moya

I work in Machine Learning and Big Data. I like learning new technologies and explaining them as clearly as I can on this site.

You may also like

Tables with JavaFX and FXML (Video)

Learn how to work with a table element in JavaFX and FXML: a simple example of adding, editing and deleting rows in a table, with a video tutorial.

Apr 14, 2013

Plotting Functions in JavaFX (LineChart)

Learn how to plot functions like f(x)=x^2 in JavaFX using a LineChart, with SceneBuilder, the controller code and downloadable NetBeans and Eclipse projects.

Jan 26, 2013

Comments

Leave a comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.