aspose file tools
The moose likes Applets and the fly likes Export Applet to Image file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Export Applet to Image file" Watch "Export Applet to Image file" New topic
Author

Export Applet to Image file

Ravi Gupta
Ranch Hand

Joined: Jul 15, 2006
Posts: 38
I want to export an applet to an image of same size. Image format can be PNG or JPEG. How should I go about it?


help your PC help you best
http://simplepccare.spaces.live.com
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
You can paint the applet into a BufferedImage's Graphics object, and then save that using the ImageIO class.
Ravi Gupta
Ranch Hand

Joined: Jul 15, 2006
Posts: 38
Thanks a ton. Will proceed as suggested and will post the code for others too.
 
Consider Paul's rocket mass heater.
 
subject: Export Applet to Image file
 
It's not a secret anymore!