so i have the following code from a Rectangle
rect.setX(10);
and I also have
rect.setY(20);
but whenever i co
Considering that the rectangle is added to a StackPane, you must use the translate properties to move the rectangle. Try :
StackPane
rect.setTranslateX(10); rect.setTranslateY(20);