I use SnapKit to do Java desktop development which compiles easily to JavaScript using TeaVM. SnapKit is both modern and conventional, a good middle ground between Swing and JavaFX. But most importantly, it combines the traditional win of desktop Java UI dev with the ease of web deployment.
SnapKit: https://github.com/reportmill/SnapKit
Demos: https://reportmill.com/snaptea/
Disclaimer: I am the primary author, so this is self-serving. But it doesn't mean it sucks. :-)