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

JDialog instance returns unexpected GraphicsConfiguration

XMLWordPrintable

    • 5.0
    • 5.0
    • x86
    • windows_vista

        JCK: 6b b15 qac
        JDK: 6 b105
        FAILED on: Windows platform (Vista, 2003)

        api/javax_swing/JDialog/index.html#NewModalityTests[constructor_05]
        api/javax_swing/JDialog/index.html#NewModalityTests[constructor_11]
        api/javax_swing/JDialog/index.html#NewModalityTests[constructor_16]

        ----

        For constructor JDialog(Frame, String, boolean,GraphicsConfiguration) the spec says:
        "Parameters:
        gc - the GraphicsConfiguration of the target screen device.
        If gc is null, the same GraphicsConfiguration as the owning Frame is used."

        This assertion is not satisfied on Windows 2003/Vista.

        Please see the following code taken from the testcase that has failed:

        ---
        // GC is null
        JDialog dialog = new JDialog(new JDialog((Frame)null), "doesn't matter", false, null);
        Window owner = dialog.getOwner();
        assertEquals(owner.getGraphicsConfiguration(), dialog.getGraphicsConfiguration();

        ---
        The last assertion fails with a message like this:

        com.sun.tck.lib.AssertionFailedException: Expected equal to : "sun.awt.Win32GraphicsConfig@110c424[dev=Win32GraphicsDevice[screen=0],pixfmt=0]", was given: "sun.awt.Win32GraphicsConfig@1aaf0b3[dev=Win32GraphicsDevice[screen=0],pixfmt=2]"

              Unassigned Unassigned
              dbessono Dmitry Bessonov
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: