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

Javadoc for method java.awt.Scrollbar.setMinimum(int) is incomplete.

XMLWordPrintable

    • hopper
    • x86, sparc
    • linux_redhat_7.2, solaris_2.6



      Name: dsR10051 Date: 08/07/2001


      Javadoc spec for method of class java.awt.Scrollbar:
      public void setMinimum(int newMinimum)
      is incomplete. If newMinimum value is equal to Integer.MIN_VALUE,
      the minimum property of Scrollbar is set to Integer.MIN_VALUE - 1.
      It should be documented.

      Here is example:
      import java.awt.*;
      public class ScrollbarTest01{
          public static void main(String[] args){
              Scrollbar sb = new Scrollbar();
              sb.setMinimum(Integer.MAX_VALUE);
              System.out.println("Integer.MAX_VALUE: " + Integer.MAX_VALUE);
              System.out.println("MINIMUM : " + sb.getMinimum());
              System.out.println("MINIMUM == Integer.MAX_VALUE - 1: " +
                      (sb.getMinimum() == Integer.MAX_VALUE - 1));
          }
      }
      --- Output ---
      %/set/jdk-builds/JDK1.4.0beta-b74/solaris/bin/java ScrollbarTest01
      Integer.MAX_VALUE: 2147483647
      MINIMUM : 2147483646
      MINIMUM == Integer.MAX_VALUE - 1: true

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

            sharonz Sharon Zakhour (Inactive)
            sdasunw Sda Sda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: