bah...
BufferedImage img = new BufferedImage(canvas.getSize().width,
canvas.getSize.height,
BufferedImage.TYPE_INT_RGB);
Graphics g = img.createGraphics();
g.drawImage(canvas.createImage(canvas.getSize().width, canvas.getSize.height) 0, 0, g.getColor(), null);
ImageIO.write(img, "JPG", file);