save jpg from applet

BufferedImage Drawing =new BufferedImage (AppletWidth, AppletHeight, BufferedImage.TYPE_INT_RGB);

paint (Drawing.getGraphics ());

FileDialog Saver =new FileDialog (new JFrame (),"Save Image", FileDialog.SAVE);

Saver.show ();

try

{

ImageIO.write (Drawing,"jpg",new File (Saver.getDirectory (), Saver.getFile ()));

}

catch (Exception BadFile)

{

}

It throws an exception. Why?

[803 byte] By [bean903a] at [2007-10-2 20:15:46]
# 1
If you hadn't written your code to totally ignore the error, you might have some idea. Try this code:catch (Exception BadFile){ BadFile.printStackTrace();}
DrClapa at 2007-7-13 22:58:05 > top of Java-index,Java Essentials,Java Programming...