import javafx.application.Application; import static javafx.application.Application.launch; import javafx.scene.Scene; import javafx.scene.control.TextArea; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class TextAreaTripleClick extends Application{ private void init(Stage primaryStage) { VBox root = new VBox(); Scene scene = new Scene(root, 400, 200); primaryStage.setScene(scene); TextArea textarea = new TextArea("the first line\nthe second line\nthe third line"); root.getChildren().addAll(textarea); } @Override public void start(Stage primaryStage) throws Exception { init(primaryStage); primaryStage.setTitle("TextArea Triple Click Test " + System.getProperty("javafx.runtime.version")); primaryStage.show(); } public static void main(String[] args) { launch(args); } }