setX
index
 
Name setX ()
Description Sets Turtle's X coordinate. Creates a line between the previous location and new location (with new X coordinate).
Syntax setX (x);
Parameters
x  Turtle's new X coordinate (double)
Returns
None  
Related setX()
setY()
setHeading()

getX()
getY()
getHeading()

Example

    Turtle t = new Turtle(this);

    t.forward(50);
    t.setX(0); 
    t.drawPath(g);