I can create a turtle that will be in a window with the following code:
Turtle t1 = new Turtle(w,100,100);
If I want to know its coordinates, I
I have no idea what Turtle class you are using, but I'd imagine you'd do something like this:
int x1 = t1.getX(w); int x2 = t2.getX(w);