public void updateImageContents(){
        cpuBuf.clear();
        renderer.readFrameBuffer(offBuffer, cpuBuf);

        synchronized (image) {
            Screenshots.convertScreenShot2(cpuBuf.asIntBuffer(), image);    
        }

        if (display != null)
            display.repaint();
    }
This test renders a scene to an offscreen framebuffer, then copies
the contents to a Swing JFrame. Note that some parts are done inefficiently,
this is done to make the code more readable.
jme3-examples/src/main/java/jme3test/post/TestRenderToMemory.java