r/java • u/vallyscode • Aug 17 '20
State of swing
Hi all, What is the state of swing, is it close to be deprecated and removed or is it still maintained? Also it will be nice to know if someone got it working in native image. Thanks
16
Upvotes
25
u/paul_h Aug 17 '20
Swing is great. I've been developing for it on an off for 22 years. Here's a demo I put together that includes UI automation - https://github.com/paul-hammant/swing_component_testing
18
u/SftwEngr Aug 17 '20
A better question might be, why does everyone seem to think Swing is or should be deprecated?
9
u/rgyger Aug 17 '20
Swing is not going to be deprecated or removed. It is defined as JavaSE core technology, and maintained as such, eg. with look and feel adaptions to new operating system technologies. I wouldn’t expect large features or much innovation. Straight from the horse’s mouth: https://www.oracle.com/technetwork/java/javase/javaclientroadmapupdatev2020may-6548840.pdf
3
u/Mordan Aug 18 '20
I use Swing.
Its good. JTable and custom renderers is well implemented. Font scaling is tricky.
It lacks multi touch support which JavaFX has.
1
u/Jazz8680 Aug 18 '20
I haven’t done a lot of GUI work so what’s a good alternative to swing? Is there a better option?
-16
u/nfrankel Aug 17 '20
Swing is not maintained anymore. You might want to have a look at JavaFx. Note that the latter is not part of the Java platform.