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

Focus is transfered to the wrong frame when a JDialog with modal = true is close

    Details

    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_xp

      Description

      FULL PRODUCT VERSION :
      Code is built with 1.5.12 and the runtime is 1.6.x

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP

      A DESCRIPTION OF THE PROBLEM :
      Focus is transfered to the wrong frame when a JDialog with modal = true is closed. The focus is transitioned to the last created frame. The focus should go to the last frame that had the focus.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      create a gui with a button. The GUI should contain a JDialog. When the button is pressed the dialog appears saying proceed info. I appears for maybe 4 second. GUI should call hide() on the dialog and then display a frame. Place the frame behind the GUI. Press the button on the GUI. After hide is called the frame in the background is displayed in the foreground. The new frame will be opened in the foreground and it will have the focus.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      The frame in the backgound should stay in the background. The new frame will be opened in the foreground and it will have the focus.
      ACTUAL -
      After hide is called the frame in the background is displayed in the foreground. It pops up when it should have stayed in the background. Then new frame will be opened in the foreground and it will have the focus.

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      Before hidding setModal(false) and before displaying setModal(true)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                art Artem Ananiev
                Reporter:
                son Oleg Sukhodolsky (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: