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

JTextArea.setColumns behaves differently than previous versions

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.6.0-beta2"
      Java(TM) SE Runtime Environment (build 1.6.0-beta2-b86)
      Java HotSpot(TM) Client VM (build 1.6.0-beta2-b86, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      In 1.6.0 setColumns doesn't have to include columns in border.
      In 1.5.0 it did.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Create text area with 6 columns followed by space in border and 80 columns for text

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Text area with 80 columns after border
      ACTUAL -
      Text area with 87 columns after border

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      textArea = new JTextArea(24, 6 + 1+ 80);
      textArea.setBorder(new BorderWithSixColumnsFollowedBySpace));


      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Change code to make number of columns in text area version dependent.

      Release Regression From : 5.0
      The above release value was the last known release where this
      bug was not reproducible. Since then there has been a regression.

            idk Igor Kushnirskiy (Inactive)
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: