/** Handles animation. */ @Override public void run() { while (isVisible()) { if (anim) { int t = tSlider.getValue(); t = t % tSlider.getMaximum() + 1; tSlider.setValue(t); } try { Thread.sleep(1000 / fps); } catch (InterruptedException exc) { LOGGER.debug("", exc); } } }
/** Handles animation. */ @Override public void run() { while (isVisible()) { if (anim) { int t = tSlider.getValue(); t = t % tSlider.getMaximum() + 1; tSlider.setValue(t); } try { Thread.sleep(1000 / fps); } catch (InterruptedException exc) { LOGGER.debug("", exc); } } }