1

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!

egor
  • 37
  • 7
  • Maybe you should also have a look at SWT: http://www.eclipse.org/swt/ – micha Dec 22 '12 at 20:27
  • A well-written question, but due to its open-ended discussion style, it's probably better suited to http://programmers.stackexchange.com/. I've voted to close it on StackOverflow. – Duncan Jones Dec 22 '12 at 20:28
  • This question is too big for any single answer. Any of the UI toolkits could do what your need although JavaFX binding would seem to suit the 'live data' feel for your application. If you are proficient in Qt, why don't you just do it in that? – Andy Till Dec 22 '12 at 20:31
  • @Duncan Jones: Sorry, will try programmers.stackexchange.com – egor Dec 22 '12 at 20:47
  • @micha: thanks! I wasn't aware of SWT – egor Dec 22 '12 at 20:48
  • @AndyTill: no reason, just want give Java a shot. I tried JavaFX when it first came out, but due to a strange flicker on mac os had to abandon it – egor Dec 22 '12 at 20:50
  • * Eclipse RCP http://wiki.eclipse.org/index.php/Rich_Client_Platform * Netbeans RCP http://netbeans.org/features/platform/ – Jiri Kremser Dec 22 '12 at 21:16
  • 1
    See also this [answer](http://stackoverflow.com/a/3072979/230513). – trashgod Dec 22 '12 at 21:56
  • question reposted at Programmers: http://programmers.stackexchange.com/q/180414/31260 – gnat Dec 24 '12 at 15:18

1 Answers1

3

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

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254
MadProgrammer
  • 343,457
  • 22
  • 230
  • 366
  • Thanks for this useful comment. I think I'll follow your advice and try prototyping my app in both toolkits. Also, I agree that my question is subjective, but at the same time I suspect that the complexity of my app's implementation *massively* depends on the toolkit I decide to use. For example, in Qt, getting a model to work with both tree and table views could be very laborious, let alone connecting it with widgets utilizing the graphics view framework (comparable to developing the rest of my app, I think). – egor Dec 22 '12 at 21:18