Comment by alfiedotwtf
1 day ago
I couldn’t find it in the docs, but does the OpenJDK contain Java’s GUI? It would be cool to write the backend in whatever language you want and then have an ACTUAL library that works on all platforms that also looks like the system GUI
It is bundled with Swing and AWT, but neither really looks like native, which has been a consistent complaint about them.
There is also JavaFX, but that is no longer bundled with the JDK.
Swing with the Nimbus Look and Feel isn't too bad for a quick, functionality-focused widget and it's super handy to have it still built into the JDK. It's not a good option for building a long term desktop application UI now though. There is no on-going development, the focus is now in Java FX. Prior to AI tooling, finding answers to Swing questions was getting much harder. Surprisingly I've found Claude to be pretty good at providing simple Swing UIs.
You can also make web frontends in Java for over a decade. This allows a full-stack app in Pure Java:
* React replacement: Flavour ( https://frequal.com/Flavour/book.html )
* Vanilla JS equivalent: TeaVM ( https://www.teavm.org/ )
Eclipse SWT ?
This is the answer for native theming, but you do end up opting in for a more difficult build process to make it work (JNI libraries and generation). Most devs will choose AWT/Swing because it's a lot simpler.