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

javadoc for BasicOptionPaneUI.addMessageComponents() has typo and grammar errors

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 9
    • 9
    • client-libs
    • None

    Backports

      Description

        The javadoc for BasicOptionPaneUI.addMessageComponents() has a couple or three typos in it and a few grammatical issues.
        Link to doc: http://docs.oracle.com/javase/8/docs/api/javax/swing/plaf/basic/BasicOptionPaneUI.html#addMessageComponents-java.awt.Container-java.awt.GridBagConstraints-java.lang.Object-int-boolean-

        The Javadoc is:

        protected void addMessageComponents(Container container,
                                            GridBagConstraints cons,
                                            Object msg,
                                            int maxll,
                                            boolean internallyCreated)

        Creates the appropriate object to represent msg and places it into container. If msg is an instance of Component, it is added directly, if it is an Icon, a JLabel is created to represent it, otherwise a JLabel is created for the string, if d is an Object[], this method will be recursively invoked for the children. internallyCreated is true if Objc is an instance of Component and was created internally by this method (this is used to correctly set hasCustomComponents only if !internallyCreated).

        The typos are in regard to references to "Object msg". There are typos for 'd' rather than "msg" and "Objc" rather than "msg". There are also several commas where there should be semicolons or periods. It would be more correct as:

        Creates the appropriate object to represent msg and places it into container. If msg is an instance of Component, it is added directly; if it is an Icon, a JLabel is created to represent it; otherwise, a JLabel is created for the string. If msg is an Object[], this method will be recursively invoked for the children. internallyCreated is true if msg is an instance of Component and was created internally by this method (this is used to correctly set hasCustomComponents only if !internallyCreated).

        Attachments

          Issue Links

            Activity

              People

                ssides Steve Sides
                ssides Steve Sides
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: