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

ScrollPane: incorrect preferred size with ScrollBarPolicy.NEVER

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • jfx20
    • javafx
    • None

      When ScrollBar has ScrollBarPolicy.NEVER set on one side, and ScrollBarPolicy.AS_NEEDED on the other, it is expected that its preferred size would account for appearing/disappearing scroll bar when the available space changes.

      To reproduce, run the attached code and manually reduce the window height.

      Notice that the left edge of the label with the red border does not shift when the vertical scroll bar appears, and also how the vertical scroll bar overlaps the label and its right border.

        1. Screenshot 2023-08-30 at 16.09.10.png
          316 kB
          Andy Goryachev
        2. Screenshot 2023-08-30 at 16.09.18.png
          258 kB
          Andy Goryachev
        3. ScrollPane_Pref.java
          2 kB
          Andy Goryachev

            angorya Andy Goryachev
            angorya Andy Goryachev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: