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

Unstable and incompatible(?) behavior of toBack method for AWT Dialog

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 9
    • client-libs
    • None

      Appears on Windows (Windows 7, JDK9 b28)

      Please open and maximize some application window (e.g., cygwin terminal) and run the attached test.

      Run Scenario 1 several (15) times - when calling toBack method for the dialog, it sometimes (often, especially if increase the delays) stays on top of the terminal window but sometimes (rarely) goes under it.

      If run Scenario 2 instead 1, then the dialogs always go under the terminal window (is it what intended?). So the behavior depends on the order of 'setVisible' calls. If remove 'setVisible' for the frame, they behaves in the same manner.

      The documentation for toBack does not give any strong promises ( http://docs.oracle.com/javase/8/docs/api/java/awt/Dialog.html#toBack-- ) and does not define explicitly what is 'back', but at least the 1st case (unstable behavior) looks buggy.

            Unassigned Unassigned
            avstepan Alexander Stepanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: