I'll assume you are using X11 ("XWindows") or whatever Sun's variant is called this week.
There is an X utility to capture any window on the screen. Just run it, click the mouse on the window you want to save, and it'll dump the image to stdout. (I suggest you redirect the output to a file. [:D]) Then use the PBM toolkit to convert to JPEG or whatever.
This webpage should give you a start:
[url]http://www.ee.byu.edu/support/khoros2.2/envision/manual/Envision/E.16.getimage/HTML/Use.html[/url]
I don't know if its directions give the right name for Sun's variation of X11 or not.
[rant]
This is why Microsoft is winning -- Sun, HP, and all the others insisted on making their own stupid changes to everything in the OS, GUI, utilities, and anything else you can name, just so they could market it as their own proprietary stuff. [:(]
[/rant]