Is it possible for me to have a class not move any further when it hits a specific spot on the y-axis? (I have my turtle start on the bottom left hand side of the screen, but I don't want it to go past 370 on the y-Axis.)


if (getX()<370) setLocation(getX()+1, getY());