package test.multitouch.app; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.control.ScrollPane; import javafx.scene.control.TextArea; import javafx.scene.layout.VBox; import javafx.scene.paint.Color; import javafx.scene.shape.Rectangle; import javafx.stage.Stage; //import test.javaclient.shared.Utils; /** * * @author Taras Ledkov < taras.ledkov@oracle.com > */ public class TouchScrollPaneAndTextApp extends Application { //public class MultiTouchApp extends InteroperabilityApp { Scene scene; Group root = new Group(); @Override public void start(Stage stage) throws Exception { stage.setTitle(this.getClass().getSimpleName()); scene = getScene(); stage.setScene(scene); stage.show(); } // @Override protected Scene getScene() { scene = new Scene(root, 320, 200, Color.WHITE); VBox vb = new VBox(); vb.setPrefSize(250, 150); TextArea textArea = new TextArea(); ScrollPane scrollPane = new ScrollPane(); for (int i = 0; i < 100; ++i) { textArea.setText(textArea.getText() + "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n"); } root.getChildren().add(vb); vb.getChildren().add(textArea); vb.getChildren().add(scrollPane); scrollPane.setContent(new Rectangle(1000,1000,Color.RED)); //Utils.addBrowser(scene); return scene; } public static void main(String[] args) { //Utils.launch(MultiTouchApp.class, args); Application.launch(TouchScrollPaneAndTextApp.class, args); } }