
Getty Images
The state and future of Java desktop application development
In today's world of web application development and SaaS, what does the future hold for Java desktop applications? It's brighter than you might think.
Thirty years ago, Java 1.0 revolutionized software development. Every Java demo featured a simple "Hello World" dialog window with the only available option: Java's Abstract Window Toolkit, the first GUI toolkit.
With AWT, developers could create graphical applications with windows, buttons, text fields and other UI components.
More recently, web development has taken center stage and JavaScript in web browsers has become the dominant force in UI development. However, that doesn't make Java desktop applications obsolete.

Modern hardware, such as the MacBook M4, offers incredible power, and local AI model platforms, such as Ollama, make offline development more viable, meaning desktop applications remain essential. Many categories of software, from IDEs to CAD software and video editing tools, still require native desktop performance. Even web browsers paradoxically are shifting toward desktop-based versions such as Electron.
Given Java's current capabilities, especially with GraalVM, which significantly improves startup performance, Java remains a compelling option for modern desktop applications.
The evolution of Java desktop development
The evolution of Java desktop technology is straightforward and distinct from web UI development, which has seen much more advancement and the introduction of many new frameworks. Let's take a deep dive into these key Java desktop technologies.

Java Swing
Swing is one of Java's most enduring desktop UI frameworks, and it continues to power high-quality applications across platforms. A prime example is the popular IntelliJ IDEA Java IDE, which demonstrates the polished potential of Java desktop apps. Another notable example in the same domain is Apache NetBeans.

It's easy to create a basic Swing desktop UI as the JDK provides everything you need -- no external dependencies are required in a Maven project, for example. Using Swing components instead of AWT means developers can build a more modern interface. I've posted several simple templates on GitHub as examples of a "Hello World" app in Swing.

Additionally, developers can use IntelliJ IDEA itself to build Swing applications. External tools such as JGoodies can help enhance the UI aesthetics of Swing-based applications.
For those who want to run Swing applications on the web, tools such as WebSwing and CheerpJ enable execution of Swing apps in a browser.

JavaFX
JavaFX is the modern successor to Swing, and it is ideal for developing new Java desktop applications. It provides a richer UI experience and is actively supported by the Gluon Java client. JavaFX can also be adapted for web deployment using WebFX, which uses the GWT transpiler. Today, OpenJFX is the primary framework for Java desktop UI development.
This GitHub repository has a Hello World example in JavaFX with Maven that shows how to set up all the necessary dependencies for Open JavaFX artifacts.

The future of Java SWT: Initiative 31
The Standard Widget Toolkit (SWT), originally developed for Eclipse, is undergoing major changes, and its future is uncertain.
The original purpose of SWT was to provide native OS look-and-feel, but in today's app development landscape, most applications run inside web-based containers, so that approach might no longer be relevant. Moreover, the toolkit currently relies on outdated OS libraries, including GTK3, Cocoa API and Win32 API.
Initiative 31 seeks to modernize the UI of the Eclipse Rich Client Platform and all Eclipse projects, seamlessly across operating systems. Meanwhile, the Eclipse IDE, which traditionally relies on SWT, also might reconsider its UI strategy in favor of Swing or JavaFX.
For now, developers should wait for more clarity before committing to SWT.
What should you choose for Java desktop development?
If you're building a new Java desktop application, JavaFX is the best choice for most general-purpose apps. However, Swing remains a viable option, especially when combined with the IntelliJ platform. Both frameworks enable developers to create effective, cross-platform applications that fully use modern hardware capabilities.
Next time, we'll explore the future of web development in pure Java. Can we eliminate JavaScript and TypeScript entirely? Stay tuned.
Lofi Dewanto is an expert software engineer, trainer and author focused on Java and its ecosystem, especially open source technologies.