@Override
    public void run() {
      try {
        while (running) {
          //noinspection BusyWait
          sleep(100);
          paintBorder();
        }
        if (prev != null) {
          prev.repaint();
        }
      }
      catch (InterruptedException ignored) {
      }
    }
@Override
    public void run()