java fx display simple rectangle

Java
setX(value); 
setY(value); 
setWidth(value); 
setHeight(value);
Rectangle rectangle = new Rectangle(x, y, width, height);

Source

Also in Java: