Hi all, I am drawing some lines or any shapes in an applet. now i want to save that drawing or applet into an image like gif or jpeg. one funda is that we will click on one button on applet, it will contact a setvlet on the server and on the server i have to write some code. can any one help me out in this regard as i need it very very urgent. thanks. ------------------
You'll need to convert the applet's canvas into a bitmap, convert the bitmap into JPEG or GIF format, then send the bitmap in a binary file transmission to the server. The server really can't do anything but catch the file - all the work has to be done on the client. As far as getting the bitmap and converting it to image file format, I recommend you ask in the AWT/Swing forum. For object-oriented drawing, you might find it better to render the objects from a list of graphics objects in the applet and transmit the list as a file - this is actually preferable if some other user would be viewing the graphics later, as different users may have different screen resolutions. The downside is that there's no real standard builtin to browsers for object-oriented image display, so you'd have to use a display applet.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.