I found a couple of questions about this, but didn't find a solution. I'm trying to write an applet so a web application can print silently documents. The idea is to provide a Javascript function which calls an applet method passing the document it wants to print. The applet just looks for the local printer an send the job. The applet is working fine in test environment (IDE) but I can't get it working in a browser environment. Although the applet is signed SUN claims that an applet call that's been started from a JS function don't have permission to use local printers even when the applet is signed (WTF!). I tried a couple of workarounds: starting a new thread from the applet method to perform printing and use a PropertyChangeListener so the applet method just updates an applet attribute and the listener used the printer. None of this have worked. Surfing the net for a solution I only found one that seems to work. Having a separate thread started in the applet init() method waiting for an applet property to change. This thread loops forever and waits x miliseconds between each execution. Although it works, it's not a good solution for us since we need the printing process to be very responsive. If we set the infinite loop step to a lower time, we get a good response but the CPU goes hot. And if we do the opposite, we loose time waiting for the loop to execute.
Well, at this point I hope I could explain correctly my problem and I'm willing to hear your thoughts.
Thanks to all.