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

saving canvas as an image

mario tan

Joined: Mar 09, 2005
Posts: 10
Hi guys!

I am a beginner in designing a java application and I posted this message because I knew you guys can help me. Just want to ask if how could you save a canvas in a java application as an image (i.e .gif, .jpeg, etc.)?

Could you gave me a simple and brief example for doing this?


thejaswini ramesh
Ranch Hand

Joined: Oct 19, 2005
Posts: 74
Hi Mario,
I too am a beginner...seeing your post i just remembered i had to do this once.Am not sure if you want to write a code to save your application as a gif.I think this link may be useful:

In my case i needed the image of a GUI as a .gif file to insert in the help menu.For this you can capture the screen with shift+printscreen and edit it with some editor like paint and then save the image.Hope this is useful to you.

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

Saving a Generated Graphic to a PNG or JPEG File

[My Blog]
All roads lead to JavaRanch
I agree. Here's the link:
subject: saving canvas as an image
It's not a secret anymore!