JavaFX. I made this program to draw a line. Why it doesnt work properly?

I want a circle to move with a translate animation and update the coordinates of a line (line starts at the same spot as the circle), so it shows the line being drawn over the circle's path. Compilable Code here:

 import javafx.animation.Animation.Status;
 import javafx.animation.PathTransition;
 import javafx.application.Application;
 import javafx.beans.value.ChangeListener;
 import javafx.beans.value.ObservableValue;
 import javafx.event.EventHandler;
 import javafx.scene.Cursor;
 import javafx.scene.Group;
 import javafx.scene.Scene;
 import javafx.scene.input.MouseEvent;
 import javafx.scene.layout.Region;
 import javafx.scene.paint.Color;
 import javafx.scene.shape.Circle;
 import javafx.scene.shape.Line;
 import javafx.scene.shape.LineTo;
 import javafx.scene.shape.MoveTo;
 import javafx.scene.shape.Path;
 import javafx.stage.Stage;
 import javafx.util.Duration;

public class AnimateDrawingLine extends Application{

@Override
public void start(Stage stage)  {
    Line linea = new Line(30,30,30,30);
    
    linea.setFill(Color.CORAL);
    
    Circle circulo = new Circle();
    circulo.setFill(Color.CORAL);
    circulo.setRadius(15);
    
    linea.endXProperty().bind(circulo.centerXProperty());
    linea.endYProperty().bind(circulo.centerYProperty());
    
    Path camino = new Path(new MoveTo(30,30), new LineTo(350,200));
    camino.setVisible(false);
    
    
    
    PathTransition transicion = new PathTransition();
    transicion.setNode(circulo);
    transicion.setDuration(Duration.millis(2000));
    transicion.setPath(camino);
    transicion.play();
    
    transicion.statusProperty().addListener(new ChangeListener<Status>(){
        @Override
        public void changed(ObservableValue<? extends Status> ov, Status t, Status t1) {
            while(t == Status.RUNNING){
                linea.setEndX(circulo.getCenterX());
                linea.setEndY(circulo.getCenterY());
            }
        }
    });
    
    Group raiz = new Group(circulo, camino, linea);
    
    stage.setScene(new Scene(raiz,400,400));
    stage.show();
  }

}

However no matter how much I tried (and believe me, I tried a lot), I just cant achieve the desired effect. The circle moves but the line does not change its size with the circle. Any ideas on how to accomplish it?

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum