DisplayMode mode; if (fs) { mode = getValidDisplayMode(width, height, bpp, frq); if (null == mode) { throw new JmeException("Bad display mode"); } } else { mode = new DisplayMode(width, height); }
DisplayMode mode = selectMode();
    private void reinitDisplay() {        // create the Display.    		DisplayMode mode;     	        if (fs) {     	            mode = getValidDisplayMode(width, height, bpp, frq);     	            if (null == mode) {     	                throw new JmeException("Bad display mode");     	            }     	        } else {     	            mode = new DisplayMode(width, height);         }        try {            Display.setDisplayMode(mode);            Display.setFullscreen(fs);        } catch (Exception e) {            // System.exit(1);            LoggingSystem.getLogger().log(Level.SEVERE,                    "Cannot recreate window");            LoggingSystem.getLogger().throwing(this.getClass().toString(),                    "reinitDisplay()", e);            throw new Error("Cannot recreate window: " + e.getMessage());        }    }