public void create() { Thread.setDefaultUncaughtExceptionHandler( new UncaughtExceptionHandler() { public void uncaughtException(Thread thread, Throwable ex) { ex.printStackTrace(); Runtime.getRuntime().halt(0); // Prevent Swing from keeping JVM alive. } }); prefs = Gdx.app.getPreferences("spine-skeletonviewer"); ui = new UI(); batch = new PolygonSpriteBatch(); renderer = new SkeletonMeshRenderer(); debugRenderer = new SkeletonRendererDebug(); skeletonX = (int) (ui.window.getWidth() + (Gdx.graphics.getWidth() - ui.window.getWidth()) / 2); skeletonY = Gdx.graphics.getHeight() / 4; ui.loadPrefs(); loadSkeleton( Gdx.files.internal( Gdx.app .getPreferences("spine-skeletonviewer") .getString("lastFile", "spineboy/spineboy.json"))); ui.loadPrefs(); }