JDK-6338130 : Modal Jdialog without owner is not in Window List
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u5
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2005-10-18
  • Updated: 2011-01-19
  • Resolved: 2005-11-07
Related Reports
Relates :  
Relates :  
Description
We use modal JDialog without owner at start of NetBeans IDE to confirm License Agreement. 
On Linux Gnome, JDK 5.0u4, 5.0u5 dialog is not in Window List (ie. list of applications window given in Window Manager toolbar). JDK 1.4.2_09 and JDK 6.0 build 55 works fine. It is Metal L&F. On Windows XP with Win XP L&F only JDK 6.0 works correctly. JDK 1.4.2_09 and JDK 5.0u5 does not show dialog in Window List. See issue http://www.netbeans.org/issues/show_bug.cgi?id=66359 for more details. The only workaround I was able to find (I cannot edit Work Around tab here in Bugster) is to create Frame with size 0,0 not resizable and use it as owner for modal dialog. This is not ideal as popup menu for Move works for invisible frame and Resize action is disabled. It should work for dialog itself in correct case and it works fine with JDK 6.0.

Still it is possible to use switching among recent windows using Alt-TAB or whatever key it is mapped on.

Result is that if user select another app window modal dialog gets hidden behind it and there is user feedback about present modal dialog waiting for user input.
I added simple test app to demostrate behavior. (There is some code to set L&F but I do not know if it is really necessary or not. I think behavior does not depend on L&F.)

Comments
EVALUATION - A JDialog without owner uses special shared hidden frame as owner - If a dialog has owner it shouldn't be shown in taskbar there was a regression when in 6.0 we temporary removed shared owner and so it was possible to see parentless dialog in taskbar but it all was restored in beta 59 So the main rule - JDialog with an owner (like "parentless" JDialog) shouldn't be shown in taskbar, if you can see it is a bug
27-10-2005