I need to write a cross-platform GUI application to process (in multiple threads) and visualize fairly large quantities of data. Ideally the application should be relatively fast and look good.
The app’s interface will consist of a table widget, a tree widget, and a custom figure-drawing widget. The user will be able to modify the data from any one of these widgets and the changes should be immediately reflected in the other widgets.
Naturally, I am planning to use MVC. However, I normally do all my GUI programming in C++/Qt, and have very limited exposure to Java. So I would really appreciate any advice on how to organize such an app in Java. In particular, should I use Swing or JavaFX? Which widgets would you pick for the job? Could you recommend any books/online tutorials that cover these aspects of the Java platform?
I will greatly appreciate any feedback. Thanks!
That’s a very subjective question.
Swing is a mature, well established and documented API. It’s been operating for over 12 years and has many 3rd party supporting APIs.
JavaFX is a relatively new technology and while it’s use is growing, it’s still relatively immature in regards to things like it’s documentation (particularly 3rd party trouble shooting and tutorials).
With JavaFX 2, you now get a tree and table implementation and are no longer restricted to it’s scripting language.
As I understand it, JavaFX’s rendering engine is far more up to date then Swing’s (Swing relies on AWT and its rendering engine, which “can” cause issues in some edge cases – this has been a criticism of Swing for a while now (the reliance on AWT)).
Swing has been used in a large number of large, high quality, high demanding applications for a number of years and while I’m sure JavaFX can probably meet the challenge, the number of projects of the scale aren’t very numerous.
It’s a question of bleed-edge as opposed to proven – IMHO.
Personally, I’d fall back to Swing, but a lot of that comes from experience and knowledge of available support. However, if I was given the chance, I’d probably be interested in prototyping a solution in JavaFX and Swing to compare not only the technologies, but also the development process.
When first released, JavaFX was targeted at competing within the same space as Flash. One could argue, it was Sun’s attempt to replace/update the Applet API. I don’t think this is JavaFX’s only direction now and JavaFX 2 has seen some significant enhancements (including the inclusion of a Tree and Table view and less of a reliance on it’s scripting language).
Some may suggest that JavFX is Swing’s replacement and that Swing is deprecated. This is not true. While it is true, Swing has not seen any major updates in the past few years, it is viable and core library.
…IMHO