Sure, everything is fine when you look up a tutorial on another botting site with a different api.
You need to make one for yourself
Just place this in your onPaint() method and you should be set.
Point mP = getMouse().getPosition();
g.drawLine(mP.x - 5, mP.y + 5, mP.x + 5, mP.y - 5);
g.drawLine(mP.x + 5, mP.y + 5, mP.x - 5, mP.y - 5);