package bug; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.TextArea; import javafx.scene.layout.VBox; import javafx.stage.Stage; public class Bug extends Application { private Scene scene = null; private TextArea ta = null; private TextArea ta2 = null; final static String MULTI_LINE_TEXT = "Line 5 line 5 line 5 line 5 line 5 line 5\n" + "Line 2 line 2 line 2 line 2 line 2 line 2\n" + "Line 3 line 3 line 3 line 3 line 3 line 3\n" + "Line 4 line 4 line 4 line 4 line 4 line 4\n" + "Line 5 line 5 line 5 line 5 line 5 line 5\n"; final static String RANDOM_SYMBOLS_TEXT = "cwq34rjf 34kovm4 334r gfrgf4343,,78766\n" + "n2346ffg,4523/6578sdfg\tsdfgg as;lkbbg..\n" + "qwew123 12332 435456ddfgf! ghgfh!!sdfgfsdg56 tgrfgd*()#$%^\n" + "dfas4!@#$$%^^ gdhb 23545%$^#$%^4356 %*%&**^&* %&&*$%^&$^"; public TextArea createControl1() { TextArea ta = new TextArea(); ta.setPrefHeight(110.0); return ta; } @Override public void start(Stage primaryStage) { ta = createControl1(); ta2 = createControl1(); ta.setText(MULTI_LINE_TEXT); ta2.setText(RANDOM_SYMBOLS_TEXT); VBox root = new VBox(10); scene = new Scene(root, 500, 250); root.getChildren().addAll(ta, ta2); primaryStage.setScene(scene); primaryStage.show(); } /** * The main() method is ignored in correctly deployed JavaFX application. * main() serves only as fallback in case the application can not be * launched through deployment artifacts, e.g., in IDEs with limited FX * support. NetBeans ignores main(). * * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }