if (SceneManager.sceneNameIsValid(preferredName) &&
SceneManager.sceneNameIsAvailable(context, preferredName)) {
create3DScene(context, preferredName);
} else {
NewSceneDialog dialog = new NewSceneDialog(getFrame(),
context, world.levelName());
dialog.setVisible(true);
if (dialog.isAccepted()) {
create3DScene(context, dialog.getSceneName());
}
}
}
}
}