import com.sun.javafx.runtime.VersionInfo; import javafx.application.Application; import javafx.application.Platform; import javafx.scene.Scene; import javafx.scene.control.Slider; import javafx.scene.layout.VBox; import javafx.stage.Stage; import java.util.concurrent.Executors; import java.util.concurrent.TimeUnit; public class SliderTest extends Application { @Override public void start(Stage stage) throws Exception { VBox root = new VBox(40); //root.setFillWidth(false); Slider s1 = new Slider(); Executors.newScheduledThreadPool(1).schedule(new Runnable() { @Override public void run() { Platform.runLater(new Runnable() { @Override public void run() { s1.setStyle("-fx-show-tick-labels: true;"); } }); } }, 5, TimeUnit.SECONDS); Slider s2 = new Slider(); s2.setStyle("-fx-show-tick-labels: true;"); root.getChildren().addAll(s1, s2); Scene scene = new Scene(root, 300, 300); stage.setScene(scene); stage.show(); stage.setTitle(VersionInfo.getRuntimeVersion()); } public static void main(String[] args) { launch(args); } }