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

Wrong class reference in javax.swing.ScrollPaneLayout documentation

XMLWordPrintable

    • b32
    • x86
    • windows_xp

      A DESCRIPTION OF THE PROBLEM :
      The documentation for the vertical and horizontal scrollbar policies states that the scrollbar policy constants are in the JScrollPane class when they are really in the ScrollPaneConstants class.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      in the setVerticalScrollBarPolicy method:
      ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED
      ScrollPaneConstants.VERTICAL_SCROLLBAR_NEVER
      ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS

      in the setHorizontalScrollBarPolicy method:
      ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED
      ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
      ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS

      ACTUAL -
      in the setVerticalScrollBarPolicy method:
      JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED
      JScrollPane.VERTICAL_SCROLLBAR_NEVER
      JScrollPane.VERTICAL_SCROLLBAR_ALWAYS

      and in the setHorizontalScrollBarPolicy method:
      JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED
      JScrollPane.HORIZONTAL_SCROLLBAR_NEVER
      JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS

      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/ScrollPaneLayout.html#setHorizontalScrollBarPolicy(int)
      ###@###.### 2005-03-18 04:01:54 GMT

            shickeysunw Shannon Hickey (Inactive)
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: