Up until quite recently, Java applets were fairly heavy. Any Java Applet requires the JVM to start up and load the applet, which can take some time on a modern machine and was even slower on the machines that were around when Java was introduced. Additionally, Java Applets are a bit more of a complex beast compared to Flash and there are a number of issues that arise as a result (ever need to sign your applets? it can potentially be a huge pain for the developer). Also, Flash quickly developed an ecosystem of products that did what people wanted (fun graphics!) quickly and easily, whereas in Java, anything other than buttons and checkboxes (stuff already provided at the base browser level) required some more work and did not have nearly the support that flash did.