JDK-6488834 : REG: An extra icon is created on the taskbar when a native dialog is opened, Win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-11-01
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
6u14Fixed 7 b04Fixed
Related Reports
Relates :  
Relates :  
Relates :  
I am showing a frame on the screen. On Clicking a button, I am opening a FileDialog. As soon as the FileDialog is shown on the screen, I am seeing an extra icon on the taskbar for the file dialog. This is incorrect. Icons are not supposed to be created for dialogs. 

This behavior is seen for Native Print and Page Dialogs also but not seen for any of the java created dialogs. When I regressed this behavior, the icons do not appear on the taskbar for FileDialog whereas it appears for Page and Print dialogs on Tiger-FCS. On Mustang b30, icons do not appear for any of the dialogs. This seems to be the correct behavior. But since Mustang-b40, the icons have started appearing for all the dialogs mentioned above. This is reproducible on WinXP as well as Win-Vista (5840).

I have attached a sample test which will show a frame with many buttons. Clicking each of those buttons would bring up the respective dialog. Check the taskbar when the dialogs are opened.

SUGGESTED FIX The only way to remove a window from the taskbar is to specify some parent for it. So the fix for this bug is to get a Java owner of the native dialog, get its native window and pass it as a parent for native dialog. However, things are not so easy. If we specify some real window as a parent for the native dialogs, this would turn on the native parent modality for this dialog. This is why all the native parents were explicitly set to NULL in the fix for 4080029. The only way left is to specify some invisible window as a parent, for example, AWT toolkit window. See http://sa.sfbay.sun.com/projects/awt_data/dolphin/6488834 for the complete code of the fix.

EVALUATION In the fix for 4080029 (AWT modality umbrella fix) all the native dialogs (file, print, page) in Java were modified to have a null native parent. This allowed AWT to control dialogs' modality more correctly, but at the same time led to the dialogs' icons to appear on the taskbar.