Application screen shot
Java 8, 82 80 77 bytes

Class that extends Frame:

ImageIO.write(new Robot().createScreenCapture(bounds()),"png",new File("a"));


Regular Class 98 Bytes:

ImageIO.write(new Robot().createScreenCapture(Frame.getFrames()[0].bounds()),"png",new File("a"));


Uses deprecated bounds() method.