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

JTree scrolling problem when using large model in WindowsLookAndFeel.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 7u4
    • Fix Version/s: 7u40
    • Component/s: client-libs
    • Labels:

      Backports

        Description

         When JTree.setLargeModel(true) is being used then horizontal scroll bar appears as needed when scrolling the tree vertically. If currently visible tree rows are short enough then horizontal scrollbar disappears. If at least one visible row is too wide horizontal scroll bar pops in.

        However this mechanism is broken if the last tree row is too long to fit visible area and all other rows are short enough to show without scrollbar. See the third JTree screenshot in the attachment - only the very last tree row is too long. Now if the tree is resized vertical scrollbar will show - as in picture A. Pressing End key to move selection to the last tree row will scroll the tree down. But since the last row is too long the horizontal scrollbar will show. However it will take some of the vertical space - see picture B. At this point clicking 'down' button on the vertical scrollbar does nothing. Also the horizontal scrollbar stays at same position when being manipulated by mouse.

        See also this NetBeans issue: http://netbeans.org/bugzilla/show_bug.cgi?id=219709

          Attachments

          1. TreeLargeModel.java
            3 kB
            Alexander Scherbatiy
          2. treescroll.png
            33 kB
            Stanislav Aubrecht

            Issue Links

              Activity

                People

                • Assignee:
                  malenkov Sergey Malenkov (Inactive)
                  Reporter:
                  saubrech Stanislav Aubrecht
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: