hi i wnat to use this code http://www.webdeveloper.com/java/jav...ead_write.html to write on my server...

but the code need a string, i need to write a image file with my applet, come from the Graphics of my JPanel (king a paint program)

i already use this code to make in another program to make a jpeg file (not a applet)

Component comp = dessin;
String name = this.getCodeBase() + "/test.jpeg";// dia.getDirectory()+dia.getFile();
int w = comp.getWidth();
int h = comp.getHeight();
BufferedImage im = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB);
Graphics2D g2 = im.createGraphics();
comp.paint(g2);
g2.dispose();
FileOutputStream out = new FileOutputStream(name);
JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out);
encoder.encode(im);
out.flush();
out.close();

can we use my bufferedimage to make a string from and past it to the code i want to uise!?

i really need help
thx