List of usage examples for javafx.scene.layout HBox prefWidthProperty
public final DoubleProperty prefWidthProperty()
From source file:User.java
private HBox drawRow1() { Text userNameField = new Text(); userNameField.setFont(Font.font("SanSerif", FontWeight.BOLD, 30)); userNameField.setFill(foregroundColor); userNameField.setSmooth(true);//from w w w.ja v a 2 s . co m // bind the field to the user.username userNameField.textProperty().bind(user.userNameProperty()); HBox userNameCell = new HBox(); userNameCell.prefWidthProperty().bind(primaryStage.widthProperty().subtract(45)); userNameCell.getChildren().add(userNameField); HBox row1 = new HBox(); row1.getChildren().addAll(userNameCell); return row1; }