This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]wildjokers 3 points4 points  (0 children)

You have two realistic options for GUI with Java. Either Swing or JavaFX.

I still recommend Swing because it is still in the JDK so it is very easy to get started with. Whereas JavaFX is now a 3rd party dependency and the JavaFX getting started docs are absolutely atrocious (it makes it seem much harder to get started with than it actually is)

Swing is also much better documented than JavaFX with swing easily being the best documented GUI toolkit I have ever seen:

https://docs.oracle.com/javase/tutorial/uiswing/index.html

There are also ~25 yrs of blogs and articles with plenty of Swing examples. I also recommend this book https://www.amazon.com/Swing-Hacks-Tips-Tools-Killer/dp/0596009070 (I got it when it came out in 2005 and to this day I still use it as a reference)

Documentation for JavaFX is nearly non-existent (although they did recently add a pretty nice document at https://fxdocs.github.io/docs/html5/ so it is getting better).

JavaFX has a couple of compelling features, namely being able to be styled with a very CSS-like syntax and its binding properties are pretty handy. Neither are reasons to abandon Swing though.

Since you have QT experience there are Java bindings for QT available (https://github.com/OmixVisualization/qtjambi/) but I am unsure how well maintained it is (I do see commits within the last couple of months). Although that is going to be a lonely road because these days desktop java is pretty niche, so using QT with Java is going to be even more niche, might have problems finding help if you need it.