Creating a BufferedImage from a 3D view shown in an AWT Canvas

Hi,



I'm creating an AWT canvas showing a 3D view using the createCanvas method as follows:       


Canvas canvas = DisplaySystem.getDisplaySystem( "lwjgl" ).createCanvas( width, height );



How do I get a BufferedImage (or just Image) of the content of the canvas?

If I try to call canvas.paint( myBufferedImage.getGraphics() )  I just get a transparent image.

If I use BufferedImage image = (new Robot()).createScreenCapture( screenRegionOf3DView ); I also get any other top level window on the image, such as Java dialogs, floating toolbars, as well as operating system windows.

This question has been asked recently, see this thread: http://www.jmonkeyengine.com/jmeforum/index.php?topic=8155.0