Skip to main content

What should be a development roadmap for a legacy Java Swing application, for the next 5 years?

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2004-05-04

Currently, I'm running a cross platform desktop app open source project. The core tech being used is Java Swing.

Over the pass 5 years, our user base is growing, in a slow but healthy trend.

We wish to plan out the development roadmap, for next 5 years. What worries us is that, Oracle has stopped on future development of Swing. There are several choices :-

1) Stick with Java Swing.
There are 2 risks right here.

- Will oracle stop shipping Swing in JVM in the future?
- Will the UI of Swing looks outdated? As, due to boom mobile computing, Microsoft seems investing a lot, in order to make mobile UI and desktop UI (metro?) seamless.

2) Keep legacy Swing code. But, tend to develop new feature in JavaFX.

3) Re-write the whole application in JavaFX. This requires significant of investment, because the legacy Swing app consists of 100k lines of code, and it is working extremely well at this moment.

4) Re-write the whole application in other cross-platform toolkit. Like QT? Cross platform is pretty important to us, as we have Linux and OSX users too.

Personally, I think (2) is the most reasonable choice. However, I would like to hear valuable input from the community.


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2006-07-24

1) JDK won't stop shipping Swing because it's a part of the public API. We can't remove an API w/o breaking backward-compatibility, so this simply won't happen. However, Swing itself is considered a legacy UI toolkit, so you're right saying that the Swing UI may look outdated.

2) This sounds like the most reasonable way to go. Check out the documentation for the JFXPanel and SwingNode components that help integrate Swing and JavaFX parts together.

3) Some people have done this - i.e. rewritten their whole app in JavaFX, and had a success with it. Others go the way #2. It all depends on the resources you're willing to invest at the moment.

I suggest to read the archives of the mailing list (and perhaps subscribe to it). The mailing list is mostly about the development of the JavaFX platform itself, however, in the past there were posted a number of success stories. Also, some issues related to mixing Swing and FX code have been discussed there, too.

best regards,