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

Window constructor doc incorrectly specifies exception

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • docs
    • None
    • beta
    • generic
    • generic

      The following text from the constructor for Window(Frame owner)

           * @exception IllegalArgumentException if <code>gc</code>
           * is not from a screen device.

      should probably say that the exception is thrown if the owner's
      GraphicsConfiguration is not from a screen device.

      The same change should probably be made for Window(Window owner)

      The whole text for the Window(Frame owner) constructor is below:

          /**
           * Constructs a new invisible window with the specified
           * Frame as its owner.
           * <p>
           * If there is a security manager, this method first calls
           * the security manager's <code>checkTopLevelWindow</code>
           * method with <code>this</code>
           * as its argument to determine whether or not the window
           * must be displayed with a warning banner.
           *
           * @param owner the <code>Frame</code> to act as owner
           * @exception IllegalArgumentException if <code>gc</code>
           * is not from a screen device.
           * @exception java.lang.IllegalArgumentException if
           * <code>owner</code> is <code>null</code>. This exception
           * is always thrown when GraphicsEnvironment.isHeadless()
           * returns true.
           * @see java.awt.GraphicsEnvironment#isHeadless
           * @see java.lang.SecurityManager#checkTopLevelWindow
           */
          public Window(Frame owner) {
              this((GraphicsConfiguration)null);
              ownedInit(owner);
          }

            sharonz Sharon Zakhour (Inactive)
            ehawkessunw Eric Hawkes (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: