public static void main(String[] args){
        TestRenderToMemory app = new TestRenderToMemory();
        app.setPauseOnLostFocus(false);
        AppSettings settings = new AppSettings(true);
        settings.setResolution(1, 1);
        app.setSettings(settings);
        app.start(Type.OffscreenSurface);
    }
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