The only real problem with Swing is that there was never a version 2. If it had been separated from AWT, updated some of the APIs and given a modern look-and-feel, it would still be relevant today. JavaFX is nice, but it broke too many conventions.
And, of course, Oracle or OpenJDK (or someone) needed to invest in a browser port of the JVM, which is totally possible these days.