My weird and wonderful first adventures with JavaFX

Donald Raab
Javarevisited
Published in
4 min readDec 11, 2022

I had no plans to learn JavaFX this year, and then it just kinda happened.

Photo by Austin Chan on Unsplash

JavaFX makes me feel young again

I’ve been developing software for a long time. 40 years feels like a long time to me anyway. Software development has gotten increasingly and incredibly complex over the years. So much so that I find it takes an incredible amount of energy and motivation just to get started building an application, especially when building “full stack” applications. JavaFX and IntelliJ are the first things I’ve seen in quite a while which personally help me to address some of the manufactured complexity of building a working application with a user interface in Java.

The Challenge

On the evening before Thanksgiving day this year, I wanted to build a simple ToDoList UI in Java in under two minutes from start to finish. I could pretty much do this with my eyes closed in VisualAge Smalltalk in the 1990s. I have not been able to feel enabled like this in Java in the past 22 years. That is, until now.

Make easy tasks simple.
Make hard tasks possible.

Java failed for a long time making easy tasks simple. Java excelled at making hard tasks possible. This is why I have programmed in Java professionally for over 20 years. Java is the future, but some of its past has been an unfortunate burden, that we just need to leave in the past.

While I failed the two-minute challenge (hey it was my first time trying), I was able to build a working in-memory ToDoList in JavaFX with IntelliJ in about an hour. Several hours and blogs later, I wound up with a more feature rich ToDoList that actually could persist itself to JSON.

The absolute key to reducing the startup complexity for me building this ToDoList was IntelliJ. Getting a working Hello World JavaFX project structure generated for me by IntelliJ saved me at least an hour or two. This is extremely important to understand. I am familiar with Maven conventions so once the project structure was generated, I knew exactly where look for things.

I do believe with enough practice, I will be able to meet the two-minute challenge for the ToDoList in JavaFX with IntelliJ.

The following is the chronicle of four blogs that tell the story of my first JavaFX adventures.

The Story

Chapter One

Meeting the challenge of building an in-memory ToDoList in Java.

Chapter Two

Exploring Java Records, LocalDate, DatePicker and TableView.

Chapter Three

Exploring Java Enums, emojis and ComboBox.

Chapter Four

Persisting my ToDoList to JSON using Jackson.

Just the beginning

I decided a few months ago, I wanted to take a break from working on Eclipse Collections to get back to showing and teaching developers how they can have fun in programming. There are so many things to learn about programming, and I think I have some useful things to teach.

This adventure has been a whole lot of fun for me. I have experienced a joy of programming I haven’t felt in quite a while.

I plan to continue iterating on my JavaFX ToDoList, and sharing new things that I learn, as I learn them. I don’t know if I will become an expert in JavaFX, but I hope to learn enough so that I can build a working JavaFX application in a professional setting when I have the opportunity.

Thank you for reading my story so far. I hope you find the joy in programming in whatever language, IDE and libraries you are coding with.

Enjoy!

I am the creator of and a Committer for the Eclipse Collections OSS project which is managed at the Eclipse Foundation. Eclipse Collections is open for contributions.

Other Java FX Resources

--

--

Donald Raab
Javarevisited

Java Champion. Creator of the Eclipse Collections OSS Java library (https://github.com/eclipse/eclipse-collections). Inspired by Smalltalk. Opinions are my own.