Java applets are still in wider use than you seem to realise. For example, in some places, they seem to be the norm for things like on-line banking or interaction with government web sites. As a second example, they are also used for UIs on network-accessible devices. As a third, I’ve seen quite a few used for interactive illustrations on academic/training web sites. People have been doing these things with Java for at least as long as they’ve been doing them with Flash. And there are plenty more cases: tomjen3 already mentioned games, IIRC the conference call/screen sharing service used by one of my clients is Java-based, etc.
The likes of Google and Mozilla might want us all to drop these tried and tested technologies and move to shiny new ones like HTML5 and the latest JS and CSS developments, but realistically, it takes time for users to move on. Most of us don’t have the luxury of controlling our customers’ platforms so we can ensure they run up-to-date builds of Firefox or Chrome with all the latest toys.
It takes time for developers to move on, too. I’m currently working on a project that uses a Java applet for a client. If I were starting the same project today, I’d probably chose different tools, but it wasn’t started today, and not so many years ago when the architectural decisions were being made, those new tools didn’t exist yet.
The main thing holding Java applets back today seems to be the second rate support they now get from the major browsers and/or Oracle, assuming they are supported at all. The number of blatant, show-stopping bugs in browser/Java interactions is getting silly, and code that has worked for years is breaking because someone installed a software “upgrade”. That’s a pity, IMHO, because the JVM is still a decent platform, and there are several interesting modern programming languages other than Java itself that we could be using to develop web apps otherwise.