1 回答
TA贡献1873条经验 获得超9个赞
我正在粘贴某人解决的解决方案,但答案已被删除。而不是创建HBox应该使用这个关键字:
public class VInputText extends HBox {
private FontAwesomeIconView icon;
private TextField textField;
private Label label;
public VInputText(double spacing) {
this.setSpacing(spacing);
this.setAlignment(Pos.CENTER_LEFT);
this.setPrefSize(Control.USE_COMPUTED_SIZE, Control.USE_COMPUTED_SIZE);
icon = new FontAwesomeIconView();
icon.setGlyphName("TIMES");
icon.setSize("1.3em");
textField = new TextField();
label = new Label("<- my validated field");
this.getChildren().addAll(icon, textField, label);
}
}
添加回答
举报
