[Java|Android|LibGDX|...] Mouse movement and collision detection

Hi everyone,

I have decided to make Air Hockey game. But I have already got into trouble. I am moving paddle with mouse that is cool. But when I am checking collision with middle line there is a problem. (2)On slow mouse movement collision works fine, but when moving mouse fast (1) collision is not detected well, because mouse move faster than paddle is rendered so paddle get stuck before middle. I have tried making game also in java without engines and it is the same, so here is the problem which I dont understand how to fix it? Any ideas?


... class public class MouseHandler implements MouseMotionListener
    public void mouseMoved(MouseEvent mouseEvent)
        if (!(mouseEvent.getX() > panel.getWidth()/2 - paddle.getR()))

        paddle.setY(mouseEvent.getY() - paddle.getR()/2);

... class Panel extends JPanel
    public void paint(Graphics g1) {


// That is code from java but the similiar code I have in libGDX engineā€¦