1import javafx.scene.control.TextArea;
2
3TextArea textArea = new TextArea(); //making a TextArea object
4
5textArea.setPrefHeight(400); //sets height of the TextArea to 400 pixels
6textArea.setPrefWidth(300); //sets width of the TextArea to 300 pixels