My aim is to draw dots when the mouse is dragged.
The problem is that when the mouse is moved very quick the distance between the dots gets huge instead of the small desired distance, that would not be recognized.

The shortened code is:

```
public void update(Graphics g){
    paint(g);
}

public void paint(Graphics g){
        for(i = 0; i <= height; i++){
            for(j = 0; j <= width; j++){
                if(virWorld[i][j] == 1) bufferGraphics.fillRect(i,j,1,1);
            }
        }
        g.drawImage(offscreen,0,0,this);
 }

public void mouseDragged(MouseEvent evt){
    curX = evt.getX();
    curY = evt.getY();
    virWorld[curX][curY] = 1;
}

public void run(){
    while(true){
        repaint();
        try{
            Thread.wait(10);    
        }
        catch(Exception exception){
            System.out.println(exception);
        }
    }
}

```

Thanks for your help,
Robin