Applets, alas, are a good idea whose timing was bad and then on top of that, there was the whole security debacle.
When applets first arrived, Microsoft got all snitty because they tried to embrace, extend, and extinguish
Java and got slapped down in court. Thus, Java support was an expensive (in bandwidth/time) add-on to Windows that no one wanted to mess with. The Internet got faster, so the download issue got less (although a 78MB download is nothing to dismiss lightly). But by then there was a mess because too many different versions of Java were in use, and the mechanisms to co-ordinate them were lacking. Who want 7 different JVM versions at once? By the time bandwidth AND disk space became essentially non-issues, we then had the ruckus about all the security holes despite the idea that Java was a language with security built-in. So applets have been a spectacular failure.
Swing, on the other hand, is less so. Swing is actually one of 3 primary GUI platforms for Java. There was the original - AWT - which was weak and ugly, Swing, which built AWT into something decent, and SWT, which was a third-party GUI not created or supported directly by Sun, later Oracle. SWT is actually quite popular. The IBM-written Eclipse
IDE is written in it, as are the GUI utilities for the Pentaho Business Intelligence suite from Hitachi Corp.
The nice thing about Java GUIs is that they are OS-independent. You can run a Swing-based Java app on Windows, MacOS, Linux and whatever Unixes are still kicking around. As well as several more obscure java hosts. That makes it good for "universal" applications. Among the examples that take advantage of this write-once/run-anywhere capability are the ArgoUML design tool, the Universal GCode Sender (I've been playing with CNC equipment lately), and a high-performance video editor called ProjectX.
Although applets are a lost cause, there is still a way to get web users up and running on Java apps. The JNLP standard allows the fetching and caching of Java apps (not applets) from the web. This is the preferred way of installing ArgoUML, for example. Because JNLP is an app system, you don't run in a browser, you run as an independent OS process and the applet sandbox does not apply. There's no special coding required, either. Any Java app can be managed via jnlp.