I'm creating a circle and the circle needs to be moved around on the GUI every second or so and be continuous. What do I need to implement in the code for that to happen?
I can get it to move to the position, but after it gets to that position it stops and i need it to be continuous.
Circle c1 = new Circle(250,250,100);
c1.setFill(Color.YELLOW);
timeline = new Timeline(new KeyFrame(Duration.seconds(.5),new KeyValue(c1.centerXProperty(),100)));
timeline.setCycleCount(Animation.INDEFINITE);
timeline.play();
root.getChildren().addAll(c1);
primaryStage.setScene(scene);
primaryStage.show();