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

JavaDoc error for JComponent.setAlignmentX and setAlignmentY

XMLWordPrintable

    • x86
    • linux, solaris_2.5.1, windows_nt, windows_2000



      Name: rmT116609 Date: 11/19/2003


      A DESCRIPTION OF THE PROBLEM :

      http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html#setAlignmentX(float)

      In the JavaDoc for JComponent, methods setAlignmentX and setAlignmentY, we have:

      setAlignmentX:

      "Sets the the vertical alignment."

      setAlignmentY:

      "Sets the the horizontal alignment."

      Is this not the wrong way round?

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      I believe setAlignmentX affects the horizontal, and setAlignmentY the vertical, contrary to the API doc.

      (Incident Review ID: 180809)
      ======================================================================

      Name: rmT116609 Date: 12/10/2003


      A DESCRIPTION OF THE PROBLEM :
      JComponent.getAlignmentX() claims to set vertical alignment in the documentation. It actually sets the horizontal alignment. setAlignmentX, getAlignmentY and setAlignmentY are similarly wrong.


      URL OF FAULTY DOCUMENTATION :
      http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JComponent.html#getAlignmentX()
      (Review ID: 230180)
      ======================================================================

            alexsch Alexandr Scherbatiy
            rmandalasunw Ranjith Mandala (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: