Java Code Examples for javafx.scene.control.TextField#setLayoutY()

The following examples show how to use javafx.scene.control.TextField#setLayoutY() . These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may want to check out the right sidebar which shows the related API usage.
Example 1
@Override
protected void drawStepContent() {
    super.drawStepContent();

    setNextButtonEnabled(false);

    textField = new TextField();
    textField.textProperty().addListener((observable, oldValue, newValue) -> {
        if (StringUtils.isBlank(newValue)) {
            setNextButtonEnabled(false);
        } else {
            setNextButtonEnabled(true);
        }
    });
    textField.setText(defaultValue);
    textField.setLayoutX(10);
    textField.setLayoutY(40);

    this.addToContentPane(textField);
}
 
Example 2
private TextField createDistanceTextField(double x, double y) {
	final TextField distanceTextField = new TextField();
	distanceTextField.setPromptText("(mm)");
	distanceTextField.setLayoutX(x);
	distanceTextField.setLayoutY(y);
	distanceTextField.setPrefWidth(75);
	distanceTextField.setAlignment(Pos.CENTER);
	distanceTextField.textProperty().addListener(new NumberOnlyChangeListener(distanceTextField));

	return distanceTextField;
}