> If I have written a progarm in java(using awt components) which can
> draw a picture, how to write code for saving that picture to a file?
Try something like:
OutputStream out = new FileOutputStream("ImageName.bmp");
ImageIO.write( image, "bmp", out );
I think u need > 1.4 for that, just have a look at the API.
>If I have written a progarm in java(using awt components) which can
>draw a picture, how to write code for saving that picture to a file?
see http://mindprod.com/jgloss/jpegencoder.html
http://mindprod.com/jgloss/imageio.html

Signature
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
> If I have written a progarm
application or applet?
>..in java(using awt components)
why AWT?
>..which can
> draw a picture, how to write code for saving that picture to a file?
If it is 1.1 for an Applet for the MSVM, that
applet will need to be jarred and signed, but
I am not sure if the MSVM is compatible with
Sun style code signing.
If it is not 1.1 compatible for the MSVM,
use the 1.4 classes Oliver pointed out, and
consider using Swing for the UI.
Oh, and "BMP"?!? Any of the available formats
in the standard package (JPEG, PNG & GIF) are
superior to .BMP format, which is not net
friendly, and most specific to Windows.

Signature
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology