103104105106107108109110111112113
@Override public void run() { try { if (animator.isStarted()) animator.stop(); } catch(Exception exc) // ie. java.lang.Exception: Stack trace, { // don't care
5859606162636465666768
// Use a dedicated thread to run the stop() to ensure the animator // thread stops before program exists. new Thread() { @Override public void run() { if (animator.isStarted()) animator.stop(); System.exit(0); } }.start(); } });