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

Frame-Dialog window hierarchy behaves weird

    Details

    • Subcomponent:
    • Understanding:
      Fix Understood
    • CPU:
      generic
    • OS:
      generic

      Description

      This is reproducible from 1.4 onwards on all platforms.

      I've two Dialogs (D1 & D2) with a Frame (F) as parent. Both the dialogs are modal. I show F first followed by D1 and D2. On clicking a button on D2, I call setVisible(false) on the frame. This hides the frame and the dialogs. Now, if I call setVisible(true) on the frame, only F and D1 is shown, D2 doesn't appear.

      Run the attached testcase for reproducing the behavior.
      The testcase shows two Frames. Click the button on the frame titled 'F'. A dialog is shown. Click the button 'Open D2' on the dialog 'D1'. This shows Dialog D2. Click the 'Close F' button on D2, the frame and dialogs disappear. If clicking the 'Open F' button on the frame brings up F and D1 only, the bug is reproduced.

      If the same sequence is tried out, sometimes, hiding the frame causes the parent frame to get hidden while the child Dialog still staying on the screen.
      The same bug is also reproduced with the attached test (ModalVisiblityTest.java) where one of the restored windows is a modal dialog. Modal dialog is restored properly the first time but fails thereafter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                art Artem Ananiev
                Reporter:
                gramachasunw Girish Ramachandran (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Imported:
                  Indexed: