@Override
    public void setTimelineEvent(){
        KeyFrame kf = new KeyFrame(Duration.millis(40), new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent t) {
                graph.addDataToSeries(time, INIT_Y - waveString[INDEX_ZERO].getCenterY(), 0.02);
  //Control each individual circleProjectile's simple harmonic motion              
                for (int i = 1; i <= circleIndex; i++) {
                    waveString[i-1].setCenterY(INIT_Y - amplitude * Math.sin(Math.PI * 2 * frequency * (time - INIT_TIME * (i - 1))));
                }
                time += INIT_TIME;
//Makes sure each ball start its motion one at a time, one after the other
                if (circleIndex < waveString.length) {
                    circleIndex++;
                }
            }
        });
        
        waveAnimationTimeline.setCycleCount(Timeline.INDEFINITE);
        waveAnimationTimeline.getKeyFrames().add(kf);        
    }