JavaFX or Swing in 2023?

Which tool should be used for creating and delivering desktop applications?

Are you wondering whether to use JavaFX or Swing for your desktop application development in 2023? Despite Swing's stability over the years, there hasn't been much development in new features. Meanwhile, JavaFX is still gaining ground, but it's difficult to find up-to-date information on its future.

Some developers even claim that desktops are no longer relevant in the age of Electron and Tauri. However, JavaFX is still a popular choice in the professional sector, and recent developments suggest that it's not going away anytime soon. In this article, we'll explore the current state of JavaFX and Swing and what you can expect in the future.

I understand that the headline may seem like clickbait. Nonetheless, I frequently searched for this exact question during my Java learning and evaluation phase, and the answers I found were quite sobering.

On the one hand, Swing is considered a stable platform that has developed over the decades; however, it is also true that not much is happening (or needs to happen) in terms of new features. All of this implies that JavaFX is the future, but it's not uncommon to find contradictory information. Often, articles are several years old. More recent search results frequently come from developers who argue that, in the era of Electron and Tauri, desktop applications are no longer necessary.

Of course, that's not true, at least not for the professional sector. As is often the case, Java is primarily used in the professional field, and GUI developments are less frequently discussed on YouTube and in tutorials. This is especially true when compared to languages that align more closely with the current zeitgeist.

However, as outlined in the JavaFX roadmap, JavaFX 20 was introduced in March, and about this, I discovered an intriguing video that also provides an excellent perspective.

JavaFX may sometimes appear to be overshadowed or eclipsed by other programming languages, but the reality is quite the opposite. In this regard, it is comforting to know that the people in charge are aware of this issue and aim to make JavaFX more accessible and comprehensible for beginners in the future.

JavaFX has a steeper learning curve compared to Swing, but overall, I am more than satisfied with its capabilities thus far. Particularly, users transitioning from Xojo won't miss much (if anything) and will appreciate the significantly improved stability and documentation.

Did you find this article valuable?

Support Jeannot Muller by becoming a sponsor. Any amount is appreciated!