I'm trying to use the Java Robot class to do some automated testing for various projects I've worked on and I'm having some trouble getting screen shots of any program that isn't full screen.
For full screen programs I just use:
Dimension dim = Toolkit.getDefaultToolkit().getScreenSize(); BufferedImage image = robot.createScreenCapture (dim);
I know that I can't get a screenshot of a particular window in general, since I'm pretty sure Java doesn't know where on the screen each window is (since its OS specific).
But I'm hoping I could still get a screeenshot of an applet in an applet-viewer, since the window is connected to the JVM in one way or another.
So, any ideas on whether or not this is possible? And if so, how I might go about doing it?