Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

save applet as image

 
htinky kwinky
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic