-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
8
-
jdk 1.8.0-ea-b59
To reproduce run the app below:
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBuilder;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextAreaBuilder;
import javafx.scene.control.TextField;
import javafx.scene.control.TextFieldBuilder;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class ScrollPaneTestDrive extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
VBox topContainer = new VBox();
topContainer.setMaxWidth(100d);
topContainer.setMaxHeight(100d);
topContainer.setStyle("-fx-border-color: blue;");
Button button = ButtonBuilder.create().text("Press me").build();
final TextField tf1 = TextFieldBuilder.create().text("0").build();
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
tf1.setText(String.valueOf(Integer.parseInt(tf1.getText()) + 1));
}
});
TextArea tf2 = TextAreaBuilder.create().prefHeight(100).build();
for (int i = 0; i < 15; i++) {
tf2.appendText("text" + i + "\n");
}
Button empty = ButtonBuilder.create().text("This is empty-action button").build();
topContainer.getChildren().addAll(button, tf1, tf2, empty);
ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(topContainer);
Scene scene = new Scene(scrollPane, 300, 200);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
}
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ButtonBuilder;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TextArea;
import javafx.scene.control.TextAreaBuilder;
import javafx.scene.control.TextField;
import javafx.scene.control.TextFieldBuilder;
import javafx.scene.layout.VBox;
import javafx.stage.Stage;
public class ScrollPaneTestDrive extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage stage) throws Exception {
VBox topContainer = new VBox();
topContainer.setMaxWidth(100d);
topContainer.setMaxHeight(100d);
topContainer.setStyle("-fx-border-color: blue;");
Button button = ButtonBuilder.create().text("Press me").build();
final TextField tf1 = TextFieldBuilder.create().text("0").build();
button.setOnAction(new EventHandler<ActionEvent>() {
@Override
public void handle(ActionEvent t) {
tf1.setText(String.valueOf(Integer.parseInt(tf1.getText()) + 1));
}
});
TextArea tf2 = TextAreaBuilder.create().prefHeight(100).build();
for (int i = 0; i < 15; i++) {
tf2.appendText("text" + i + "\n");
}
Button empty = ButtonBuilder.create().text("This is empty-action button").build();
topContainer.getChildren().addAll(button, tf1, tf2, empty);
ScrollPane scrollPane = new ScrollPane();
scrollPane.setContent(topContainer);
Scene scene = new Scene(scrollPane, 300, 200);
stage.setScene(scene);
stage.setTitle(System.getProperty("java.runtime.version") + "; " + System.getProperty("javafx.runtime.version"));
stage.show();
}
}