The following example source code shows how to capture the screen and save it to an image. Hope you find it useful.
/* Author: Perry Lee* Submission: Capture Screen (Add Screenshot Capability to Programs)* Date of Submission: 12/29/03*/
public