By now, html is totally designed to be good looking.
Look at all the amount of work, that went into CSS and co.
Things that cost me a line in CSS, like text-shadow, probably would require me to implement a shader libary in swing.
In Swing, yeah. Swing focuses very much on boring business-type UI.
Not in JavaFX where such shaders are pre-canned and there's a CSS dialect too. I wrote my web-like app in JavaFX. It was no big deal.
However, most people do a lot of work to make web sites and apps attractive. You can do that work with Swing or JavaFX too. I've done it before, it was fine, I ended up with a modern web-ish feel to the UI.