public void animate() { try { semaphore.acquire(); } catch (InterruptedException ex) { System.out.println(ex); } super.animate(); semaphore.release(); }