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

Keep top Table(List?) row aligned when dragging the scrollbar

XMLWordPrintable

      As of Windows XP SP2 (and probably earlier Windows versions), it's darn near impossible to get the top row of a table to become unaligned with the top of it's enclosing scrollpane.
      Offhand I can think of two ways where this used to happen:
      * you used to be able to do this by dragging the scrollbar, but Windows now waits until you've dragged far enough to reveal a new row, and then does the repaint.

      * if you scrolled all the way to the bottom of a table, the bottom cell would be aligned with the bottom of the scrollpane, and the top cell would be unaligned. Now, Windows adds a little bit of space to the bottom of the table to keep the top of the table aligned.

      This is true of the "Details" view in Explorer and native file chooser windows.

      JTable does not behave this way. The top row of a JTable may become misaligned in both of the above situations. For this reason, JFileChooser (and other places) under WindowsLookAndFeel behave unlike Windows.

      The fix will probably be in JScrollPane/JScrollBar, changing it to only repaint once the user has dragged the scroll thumb a distance >= the scrollableUnitIncrement.

            shickeysunw Shannon Hickey (Inactive)
            bchristi Brent Christian
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: