@Override
    public void initialize(AppStateManager stateManager, Application app) {
        super.initialize(stateManager, app);
        this.app = app;

        if (app instanceof SimpleApplication) {
            SimpleApplication simpleApp = (SimpleApplication) app;
            if (guiNode == null) {
                guiNode = simpleApp.guiNode;
            }
            if (guiFont == null) {
                guiFont = simpleApp.guiFont;
            }
        }

        if (guiNode == null) {
            throw new RuntimeException("No guiNode specific and cannot be automatically determined.");
        }

        if (guiFont == null) {
            guiFont = app.getAssetManager().loadFont("Interface/Fonts/Default.fnt");
        }

        loadFpsText();
        loadStatsView();
        loadDarken();
    }
Called by SimpleApplication to provide an early font
 so that the fpsText can be created before init.  This
 is because several applications expect to directly access
 fpsText... unfortunately.

@param guiFont the desired font (not null, alias created)
jme3-core/src/main/java/com/jme3/app/StatsAppState.java