@Override
    public void setEnabled(boolean enabled) {
        super.setEnabled(enabled);
        flyCam.setEnabled(enabled);
    }
This is called by SimpleApplication during initialize().
jme3-core/src/main/java/com/jme3/app/FlyCamAppState.java