2

I was trying to implement autoscrolling for small project of mine, where I thought of using a thread for it.

@Override
public void run() {

    while(true) {
        System.out.println("");
        if(isScrolling) {
            view.getWorkarea().autoScroll(direction);

            try {
                sleep(100);
            } catch (InterruptedException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
            }
        }
    }
}

Now, I got this strange bug, where it's only working while I don't remove System.out.println(""). If I remove it, autoscrolling stops working. Does anyone know why it's happening and how to solve it?

tshepang
  • 12,111
  • 21
  • 91
  • 136

0 Answers0