Use the RepaintManager to capture an Image of what is on a JComponent.
Use the Acme GIF encoder to go from Image to output stream.

http://www.acme.com/java/software/Acme.JPM.Encoders.GifEncoder.html

[There might be something in the Java Media Framework to do this also.]

J

Thanks for your message at 07:27 AM 9/3/99 -0700, Ananth:
>Thank you very much for your response. I got a couple of more questions
>regarding this.
>If someone could give me pointers on them, I would highly appreciate it.
>
>1. java.awt.Robot's screenCapture method returns a java.awt.Image, whereas
>    JPegEncoders's encode method takes in java.awt.image.BufferedImage!
>    Is there any workaround for this?
>2. What I'm trying to accomplish is to create an image on Server side.
>    But I'm trying to use Swing components to create a jazzy Panel and
> then trying to save that as a gif/jpeg.
>    So I would not really even want to display the Panel on the screen
> (means I would not be using setVisible(true) on the panel!).
>    Any pointers???


John Zukowski    Focus on Java Guide / http://java.about.com
     [EMAIL PROTECTED] | [EMAIL PROTECTED]
Author Java AWT Reference / Zukowski's Definitive Guide to Swing
     MageLang Institute          / Mastering Java 2
     http://www.magelang.com  Big Brother Inside

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to