Source Code : ScrollPane holds TextArea
Java Is Open Source Programming Language You Can Download From Java and Java Libraries From http://www.oracle.com.
Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://www.oracle.com.
Click Here or search from google with Libraries Name you get jar file related it
ScrollPane holds TextArea
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.control.TextAreaBuilder;
import javafx.scene.layout.VBox;
import javafx.scene.layout.VBoxBuilder;
import javafx.stage.Stage;
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(final Stage primaryStage) {
Group root = new Group();
final TextArea textArea = TextAreaBuilder.create()
.prefWidth(400)
.wrapText(true)
.build();
ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(textArea);
scrollPane.setFitToWidth(true);
scrollPane.setPrefWidth(400);
scrollPane.setPrefHeight(180);
VBox vBox = VBoxBuilder.create()
.children(scrollPane)
.build();
root.getChildren().add(vBox);
primaryStage.setScene(new Scene(root, 500, 400));
primaryStage.show();
}
}
Thank with us