@Override
    public void mouseMoved(MouseEvent e) {
        if (e.getPoint().x >= 0 && e.getPoint().x <= getWidth() && e.getPoint().y >= 0 && e.getPoint().y <= getHeight()) {
            mouse = e.getPoint();
            pathCursor = e.getPoint();
            getParent().repaint();
        }
    }