Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8093102

Scrollbars are shown when making a window smaller, and sometimes stay there

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 8u11
    • javafx
    • windows 7 and linux, JDK 8u11

      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);
          }
      }

            jgiles Jonathan Giles
            ndarcy Nick D'Arcy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: