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

DOC bug: API spec java.awt.Rectangle.grow(int,int) is incorrectly described

XMLWordPrintable

    • 1.1.4
    • sparc
    • solaris_2.5.1
    • Not verified


      In the api spec for java.awt.Rectangle.grow(int,int), it says,

      "Modifies the rectangle so that it is h units larger on both the left and right size, and v units larger at both the top and bottom."
      This has a typo - "size."

      The next sentence of the doc states, "The new rectangle has (x-h,y-v) as its top-left corner, a width of x+2h and a height of y+2v."

      However, according to the correctly working code, the new rectangle's width is the original width + 2h and the new rectangle's height is the original height + 2v.


            asommere Alan Sommerer (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: