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

JWindow(GraphicsConfiguration) always throws IllegalArgumentException

XMLWordPrintable

    • beta2
    • sparc
    • solaris_2.6



      Name: acR10002 Date: 12/21/2000



      You can see the detailed description as well as minimized standalone test to illustrate the
      problem in the bug report 4301193. The bug #4301193 has been incorrectly closed as the duplicate
      of 4370840. The 4370840 was fixed but the fix has been broken after fix of another bug #4392721.
      As a result, the javadoc comment for JWindow(Window owner, GraphicsConfiguration gc) now says:

      (see delta 1.38 for JWindow.java,
      javadoc comments for public JWindow(Window owner, GraphicsConfiguration gc)):
      --------------------- JWindow.java -----------------------
      ...
           * @exception java.lang.IllegalArgumentException if <code>owner</code>
           * is <code>null</code>. IllegalArgumentException if
           * <code>gc</code> is not from
           * a screen device. This exception is always thrown
           * when GraphicsEnvironment.isHeadless() returns true
      ...
      ----------------------------------------------------------

      But at the same time JWindow(GraphicsConfiguration gc) is implemented as:

      --------------------- JWindow.java -----------------------
      ...
       public JWindow(GraphicsConfiguration gc) {
              this((Frame)null, gc);
          }
      ...
      ----------------------------------------------------------

      So it will throw IllegalArgumentException regardless of the GraphicsConfiguration passed.

      ======================================================================

            svioletsunw Scott Violet (Inactive)
            aycsunw Ayc Ayc (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: