How to set the value of a JavaFX Spinner?

Matt :

I'm wondering how to set the value of a JavaFX Spinner, as I haven't been able to figure it out.

I know with Swing you can just use spinner#setValue but it seems to be different with JavaFX.

@FXML
private Spinner<Integer> spinner;
James_D :
spinner.getValueFactory().setValue(...);

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=450371&siteId=1