protected void reshapeCurrentViewPort(int width, int height) {

        ViewPort viewPort = getViewPort();
        Camera camera = viewPort.getCamera();
        int cameraAngle = getCameraAngle();
        float aspect = (float) camera.getWidth() / camera.getHeight();

        if (isMain()) {
            getRenderManager().notifyReshape(width, height);
            camera.setFrustumPerspective(cameraAngle, aspect, 1f, 10000);
            return;
        }

        camera.resize(width, height, true);
        camera.setFrustumPerspective(cameraAngle, aspect, 1f, 10000);

        final List<SceneProcessor> processors = viewPort.getProcessors();

        boolean found = false;
        Iterator<SceneProcessor> iter = processors.iterator();
        while(!found && iter.hasNext()) {
            if (!(iter.next() instanceof AWTFrameProcessor)) {
                found = true;
            }
        }

        if (found) {

            FrameBuffer frameBuffer = new FrameBuffer(width, height, 1);
            frameBuffer.setDepthBuffer(Image.Format.Depth);
            frameBuffer.setColorBuffer(Image.Format.RGBA8);
            frameBuffer.setSrgb(true);

            viewPort.setOutputFrameBuffer(frameBuffer);
        }

        for (final SceneProcessor sceneProcessor : processors) {
            if (!sceneProcessor.isInitialized()) {
                sceneProcessor.initialize(renderManager, viewPort);
            } else {
                sceneProcessor.reshape(viewPort, width, height);
            }
        }
    }
Reshape the current view port.

@param width  the width.
@param height the height.
jme3-desktop/src/main/java/com/jme3/system/AWTFrameProcessor.java