My code for creating a Textfield using `new TextField`was used as a parameter for a method like this

```
x.getChildren.addAll(new TextField());

```

My program has a button that creates TextField. 

It's a loop to create a number TextFields until the condition is satisfied.  

 My own code looks like this:

```
sub.setOnAction(e-> {
    v.getChildren().clear(); //just clearing things
    v1.getChildren().clear(); //just clearing things

    makeStr(Integer.valueOf(numOpt.getText()));
    for(int i = 0; i < list.size(); i++){
        v.getChildren().addAll(new Label(list.get(i).toString()));
        v1.getChildren().addAll(new TextField());           
    }   
    list.clear();
});

```

However I cant just change its size like this.

```
v1.getChildren().addAll(new TextField().setPrefWidth(800));

```

Maybe a better code can fix the problem!