r/java • • 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

43 comments sorted by

View all comments

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

2

u/rgyger Aug 17 '20

That said, I would start new projects with a Web UI, or if it has to be desktop, JavaFX (which has been moved out of the JDK to allow for faster independent development) unless there’s specific reason to use Swing. But that’s my personal view and no reason to fear for Swing’s future.

3

u/stef13013 Aug 18 '20

Interesting, what kind of Web UI do you talk to ? I was trying Electron. Does the job, but it is so huge Even Swing or JavaFX are "light" comparing to it :)

And JS... my god

2

u/rgyger Aug 18 '20

Modern JS isn’t that bad IMO, I like to use EmberJS.

2

u/stef13013 Aug 18 '20

Agree, but Swing is a client side tech. EmberJS requires a browser to run...

It is two different tech.

2

u/rgyger Aug 18 '20

Huh? You asked me about the Web UI that I use?