JDK-6435804 : REGRESSION: NetBeans 5.0 icon no longer shows up when you alt-tab on XP
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 6
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2003,windows_xp
  • CPU: x86
  • Submitted: 2006-06-07
  • Updated: 2011-01-19
  • Resolved: 2006-06-30
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.
JDK 6
6 b91Fixed
Related Reports
Relates :  
Description
Instead of the ugly box, the default Java logo now appears. I've attached a screen shot.

Comments
EVALUATION When dialog is about to be disposed a number of destructors being called. So following chaing takes place: ~dialog -> ~frame -> ~window. We are interested in ~frame only as if contains icon check: if (m_hIcon != NULL) { ::DestroyIcon(m_hIcon); } Unfortunately even the frame itleft still alive (only dialog is disposing) it affects icon installed on frame. We shouldn't destroy that icon if dialog used it. So if (m_hIcon != NULL && !m_iconInherited) { would be sufficient there.
14-06-2006

EVALUATION Looking on native peers I noticed that AwtDialog::DoUpdateIcon() calls to super.DoUpdateIcon() which in turn relies on GetEffectiveIcon(). This method returns NULL in case of Dialog. I tried to eliminate virtual from there but it doesn't help, GetEffectiveIcon() now calling from AwtFrame but icon on ALT-TAB is still default.
14-06-2006

EVALUATION This happens on showing dialog with parent having different icon installed. To uncover the bug set icon on a frame and then open a child dialog. After that ALT-TAB will reflect a default java icon whereas frame is still having correct (explicitly installed) icon in it. Here is what happening there. Showing dialog forces standard initialization which includes super() (ctor of a WWindowPeer) and super.initialize() which contains updateIconImages() on parent frame. java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1206) at sun.awt.windows.WWindowPeer.updateIconImages(WWindowPeer.java:220) at sun.awt.windows.WWindowPeer.initialize(WWindowPeer.java:119) at sun.awt.windows.WDialogPeer.initialize(WDialogPeer.java:48) at sun.awt.windows.WComponentPeer.<init>(WComponentPeer.java:594) at sun.awt.windows.WCanvasPeer.<init>(WCanvasPeer.java:41) at sun.awt.windows.WPanelPeer.<init>(WPanelPeer.java:54) at sun.awt.windows.WWindowPeer.<init>(WWindowPeer.java:102) at sun.awt.windows.WDialogPeer.<init>(WDialogPeer.java:26) at sun.awt.windows.WToolkit.createDialog(WToolkit.java:412) at java.awt.Dialog.addNotify(Dialog.java:742) at java.awt.Dialog.conditionalShow(Dialog.java:885) at java.awt.Dialog.show(Dialog.java:1028)
13-06-2006

EVALUATION Initially I thought its a change in NB code as it's okay with NB5.0 and latest JDK build - the old black icon appears on Alt+Tab. But new Java icon shows in NB5.5 with the same JDK build. But after more testing I found that: 1. new Java icon only appears after opening a Dialog (I use New Project dialog) 2. the NB icon looks warped on ALT+TAB (I see some kind of artefacts in the left and right bottom corners)
08-06-2006