I don't know what the sketch at the above link does, but you can just use the Robot class, shipped with Java (no additional library needed) to do it (see createScreenCapture). Otherwise, see also the How to Install a Contributed Library article.
Leave a comment on PhiLho's reply
Change topic type
Link this topic
Provide the permalink of a topic that is related to this topic