public void take ( ) throws AWTException { Rectangle area = new Rectangle ( dimensions ) ; Robot robot = new Robot ( ) ; BufferedImage image = robot . createScreenCapture ( area ) ; data = getByteArray ( image ) ; }
Takes the screen capture of the designated area . If no dimensions are specified it will take a screenshot of the full screen by default .