If you run the code below a window will be shown with a TextArea in it.
If you resize the window to make it smaller, scrollbars are displayed as the drag is happening. About 50% of the time after the resize has finished the scrollbars remain and only disappear if some text is typed.
The scrollbars should never be displayed in this case because there is nothing to scroll. It doesn't look very good. Obviously the scrollbars should not hang around after the resize has finished.
Also, just checked this with Java 7 and that seems to work fine so it looks like a regression.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TextAreaTest extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane borderPane = new BorderPane();
Scene scene = new Scene(borderPane, 500, 500);
stage.setScene(scene);
TextArea textArea = new TextArea();
borderPane.setCenter(textArea);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
If you resize the window to make it smaller, scrollbars are displayed as the drag is happening. About 50% of the time after the resize has finished the scrollbars remain and only disappear if some text is typed.
The scrollbars should never be displayed in this case because there is nothing to scroll. It doesn't look very good. Obviously the scrollbars should not hang around after the resize has finished.
Also, just checked this with Java 7 and that seems to work fine so it looks like a regression.
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.control.TextArea;
import javafx.scene.layout.BorderPane;
import javafx.stage.Stage;
public class TextAreaTest extends Application {
@Override
public void start(Stage stage) throws Exception {
BorderPane borderPane = new BorderPane();
Scene scene = new Scene(borderPane, 500, 500);
stage.setScene(scene);
TextArea textArea = new TextArea();
borderPane.setCenter(textArea);
stage.show();
}
public static void main(String[] args) {
Application.launch(args);
}
}
- duplicates
-
JDK-8097060 [Modena, TextArea] Vertical scrollbar appears in TextArea and then disappears
-
- Resolved
-