I don't think flash was much better at anything interactive, or at least animated. On the same hardware as above I remember "frog in a blender" could render well south of 1FPS, on a 486/686 (outdated but still in common use) it was more like 0.1FPS.
Too be fair though, it's a hard comparison, applets were generally apps while flash was fancy graphics.
So, Java wasn't ahead of its time, and it was much much worse than Flash (which, despite numerous efforts to kill it, is still alive, unlike Java Applets which have essentially been dead for years).