choiceBox.getSelectionModel().selectedItemProperty().addListener(new ChangeListener<String>() {
@Override
public void changed(ObservableValue<? extends String> observableValue, String s, String s2) {
if (s2.equals("Inline skin")) {
title.setText("Inline skin");
form.setSkin(new InlineSkin(form));
} else {
title.setText("Default skin");
form.setSkin(new DefaultSkin(form));
}
}