I'm really new to processing, so this may sound trivial. I have a sketch including java.awt.Toolkit. Even though I can export it as an application, when trying to export it as javascript (through version 2.0 of processing) in html, I can't make it play on any browser (I have checked that javascript is enabled, and also tried the "older" processing.js method with 1.5 version). It also won't work when exporting it as a java applet, and opening it in a browser. When taking away the part that has to do with the java.awt.Toolkit all work smoothly. Are there any limitations when using certain java packages with javascript? If so, how could I overcome this?
This is the code that I'm talking about (this is in a bigger sketch but works like this as well):