import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.TextArea; import javafx.stage.Stage; public class Main extends Application { public static void main(String[] args) { launch(args); } @Override public void start(final Stage stage) { Group root = new Group(); final Scene scene = new Scene(root); stage.setWidth(300); stage.setHeight(600); stage.setScene(scene); TextArea ta = new TextArea(); ta.setStyle("-fx-background-color: pink;"); root.getChildren().add(ta); stage.show(); } }