Object result = makeAnOperation("createScreenCapture", new Object[] {
new java.awt.Rectangle(screenRect.x, screenRect.y, screenRect.width,
screenRect.height) },
new Class[] { java.awt.Rectangle.class });
if (result.getClass().isAssignableFrom(BufferedImage.class)) {
return new AWTImage(BufferedImage.class.cast(result));
} else {
throw new JemmyException("Screen capture (" + result
+ ") is not a BufferedImage");
}
}