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

JTable.getScrollableTracksViewportWidth() is incompatible with the spec

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.2.0
    • docs
    • beta
    • sparc
    • solaris_2.5



      Name: asC58863 Date: 05/28/98


      JTable.getScrollableTracksViewportWidth() is incompatible with the spec.

      JavaDoc says :
      "public boolean getScrollableTracksViewportWidth()
           Returns false to indicate that the width of the viewport does not
           determine the width of the table.
         Return : false
      "
         
      But getScrollableTracksViewportWidth() returns true
      when autoResizeMode is not equal to AUTO_RESIZE_OFF

      This bug has been introduced in JDK1.2-Beta4G

      Here is the test demonstrating the bug:
      ------------------ Test.java -----------------
      import java.awt.swing.*;
       
      class Test {
        public static void main(String[] argv) {
          JTable table = new JTable();
          System.out.println(" getScrollableTracksViewportWidth() returns "+
                              table.getScrollableTracksViewportWidth());
          System.exit(0);
        }
      }
      -------------- Output from the test -----------------
      :\>java Test
        getScrollableTracksViewportWidth() returns true
      ------------------------------------------------------

      ======================================================================

            sharonz Sharon Zakhour (Inactive)
            asemidetsunw Alexei Semidetnov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: