JDK-6799415 : PIT : Parent dn't gain the focus when dialog is closed faster by pressing ESCAPE key
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6u14
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • OS: solaris_10
  • CPU: sparc
  • Submitted: 2009-01-30
  • Updated: 2011-04-28
Related Reports
Relates :  
I have a frame , which contains a button. when i press the button a dialog is displayed , each dialog intend has button, when pressing the button on the dialog ,shows the dialog.
I show around 15 dialog, when i press the escape key faster to close the dialogs , the parent dialog dn't gets the focus. Hence can't close the dialog.  This happens only when testcase is launched using -Djava.security.manager. 

Step to Reproduce:-
1) Run the attached testcase.
	java -Djava.security.manager WindowTest
2) you will see the frame with the button, press space bar or click on the button. You see the dialog. 
3) Repeat step(2) for some 10 to 15 times.
4) Press ESCAPE key faster,so that dialog gets closed.  If the parent's dialog dn't get the focus & can't able to close the dialog , then the bug is reproduced.

EVALUATION Reproduced on linux (with metacity) also. The bug is reproduced under the folowing conditions: the dialog is shown, it's reparented (becomes decorated) but the warning icon is not yet shown. If you press ESC after the icon is shown, the frame does regain focus (that's why you have to press ESC fast).