File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes save applet as image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "save applet as image" Watch "save applet as image" New topic

save applet as image

htinky kwinky

Joined: Apr 11, 2008
Posts: 1
how to save an applet generated graph as an image in any format? I have an applet code to generate a graph and want to automatically save that image on the disk to use it later. I want to do this for 13,000 records. Thanks
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
Hello "htinky kwinky"-

Welcome to JavaRanch.

On your way in you may have missed that we have a policy on screen names here at JavaRanch. Basically, it must consist of a first name, a space, and a last name, and not be obviously fictitious. Since yours does not conform with it, please take a moment to change it, which you can do right here.

is there any user interaction happening with the applet? If not, why does it need to be an applet? Applets cause certain complications -especially if you want to perform file I/O- so maybe there are better ways to do this?

This example shows how to save a Graphics2D-generated image to a file.
subject: save applet as image
jQuery in Action, 3rd edition