BufferedImage image = null;
try ...{
image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB);
getContentPane().paint(image.getGraphics()); 
} catch (Exception e) ...{
System.out.println(

