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

With a JTree in a JScrollPane, expanding a node will force incorrect scrolling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.2.0
    • 2.0_beta17, 2.0_beta4, 1.1.5, 1.1.6
    • client-libs
    • swing1.1
    • generic, x86, sparc
    • generic, solaris_2.6, solaris_7, windows_nt



      Name: rk38400 Date: 04/15/98


      Steps...
      1) Use any app which has a JTree in a JScrollPane (The "SampleTree" swing example works fine)

      2) Resize the app so that the visable rect is just big enough to contain the text of the first level nodes.

      3) Expand any node so that the text of that node now is greater than the width of the visable rect.

      Result:
      The tree is automatically scrolled to the left such that root node's handle is now hidden.
      Continued expansion of deeper nodes will cause continued scrolling inappropriate scrolling.

      Expected Bahavior:
      I would have expected the tree to NOT automatically scroll as a result expanding the nodes.
      If this is a "feature", then I would expect a rather simple way to turn it off.

      Notes:
      This unexpected behavior happens with any L&F, even the Windows L&F.
      I'm not sure if the tree scrolling is appropriate for Mac, Motif or any other platform, but it certianly is not for Windows.

      To see an example of proper behavior, play with the tree on the left pane of a "Windows Explorer" window.
      No matter how deep you expand, and no matter how far off the visable rect the nodes grow, the tree will not automatically
      scroll for you.

      JDK version 1.1.5
      Swing version 1.0.1
      (Review ID: 28077)
      ======================================================================

            svioletsunw Scott Violet (Inactive)
            rkarsunw Ralph Kar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: