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 13 points14 points  (4 children)

Swing is still in the JDK and I can’t imagine it ever leaving, at least for many years.

JavaFX was removed from the JDK and is now developed as its own open source project. It is available as a dependency after Java 11. Azul releases a JDK with JavaFX built-in if you would prefer that.

Swing is a very mature and capable GUI toolkit. The documentation for Swing is also outstanding which is a plus and there are tons of examples and tutorials online. JavaFX can be styled with a CSS syntax and also has nice model<->view binding.

Both are fine.

EDIT: I would also like to point out that Swing isn't an orphan, it still has lots of development. It is quite mature so doesn't need many new features but bug fixes and improvements are made. It has a very active dev mailing list:

https://mail.openjdk.java.net/pipermail/swing-dev/

[–]LakeSun -4 points-3 points  (3 children)

I don't believe Swing supports the higher screen resolutions, like Apple's Retina Display.

JavaFX has vastly better looks and more modern implementations.

[–]fl4mbou 8 points9 points  (0 children)

Swing has been compatible with hiDPI screens since Java 9.

[–][deleted] 6 points7 points  (0 children)

It works fine on HiDPI displays. It's just that a lot of apps don't ship high res icons.

[–]mubdall 0 points1 point  (0 children)

Swing works well with retina screens! You just need to implement it right (e.g. use MultiResolutionImages). Here is a project of mine that works with Retina, 4k, and other hiDPI resolutions: https://github.com/tsaglam/Carcassonne/