Reputation: 1267
No. Not pressing PRT Screen. But here is what I want. And I need to know if it can be done and by what means :D
Okay so I have a java applet that runs and displays a walking man. I need it so when I access a script (in some web scripting language) it takes a "screenshot" of that applet and then saves it on the server. Is this possible? and by what scripting means could I do it?
Thanks in advance!
Upvotes: 2
Views: 639
Reputation: 147124
If there are heavyweight components they might not come out, but the obvious way is:
java.awt.image.BufferedImage
createGraphics
to create a Graphics
instance.update(Graphics)
on the applet.BufferedImage
to a wire file format.You can use LiveConnect to connect both ways between Java and JavaScript. It's usually easy to add Java code to an applet simply by adding another reference to the archive attribute of the applet tag.
There are plenty of tutorials on the various parts. I've never done it myself.
Upvotes: 2