Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Export Applet to Image

 
Ravi Gupta
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, i have a j2ee based application that launches an applet which displays a graph based on some data pulled from a database. My question is that can i add an element to the applet that can export the current applet to an image file like jpeg?
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.awt.Robot.createScreenCapture method can take screenshots, but the applet would need to be signed to be allowed to do this.

The method takes a Rectangle parameter that tells it which area of the screen to capture; you'll need to play around with that to find out what value you need to pass to it that covers just the applet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic