 <pre><code>public void changeWidth(final Pane/*Region*/ node, double width) {//its a Pane or Regions this.node = node; this.timeline = TimelineBuilder.create() .keyFrames( new KeyFrame(Duration.millis(20), new KeyValue( going here? , width, WEB_EASE) ) ) .build(); setCycleDuration(Duration.seconds(5)); setDelay(Duration.seconds(0)); </code></pre> <p>}</p> <blockquote> <p>In this case my node is a "AnchorPane".</p> </blockquote> <p>your <code>AnchorPane</code> is a subclass or <code>Pane</code>, let your wrappers or methods take in <code>Pane</code> or their respective class</p>