JDK-4779641 : 1.4.2 Regression: Non-resizable dialogs should not show icons.
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_nt,windows_xp
  • CPU: x86
  • Submitted: 2002-11-15
  • Updated: 2002-12-13
  • Resolved: 2002-12-13
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.
Other
1.4.2 betaFixed
Related Reports
Relates :  
Relates :  
Description
Attached is a test case that shows the problem.
Run the test and click the button to bring up 4 dialogs:
  1. AWT resizable
  2. AWT non-resizable
  3. Swing resizable
  4. Swing non-resizable

Under 1.4.0 and 1.4.1, the non-resizable dialogs have no icons in the upper left. In 1.4.2-beta-b07, they have icons. I believe this to be unintentional and that we wish for non-resizable dialogs to not have icons.

Running on Windows NT 4.0 SP6

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis-beta FIXED IN: mantis-beta INTEGRATED IN: mantis-beta
14-06-2004

EVALUATION Commit to fix in Mantis (regression). ###@###.### 2002-11-15 Name: vuR10080 Date: 11/27/2002 ###@###.### 2002-11-27 awt_Component.h delta 1.156 silently changed signature of the FillClassInfo method so overriding methods in subclasses turned into just overloaded. As a result, dialog class now has the class icon (steaming cup). ======================================================================
11-06-2004

SUGGESTED FIX ------- awt_Window.h ------- *** /tmp/sccs.3gaaxR Wed Nov 27 19:35:22 2002 --- awt_Window.h Wed Nov 27 19:21:48 2002 *************** *** 34,40 **** virtual const char* GetClassName(); virtual LPCWSTR GetClassNameW(); ! void FillClassInfo(WNDCLASS *lpwc); static AwtWindow* Create(jobject self, jobject parent); --- 34,40 ---- virtual const char* GetClassName(); virtual LPCWSTR GetClassNameW(); ! virtual void FillClassInfo(void *lpwc); static AwtWindow* Create(jobject self, jobject parent); ------- awt_Window.cpp ------- *** /tmp/sccs.4gaaxR Wed Nov 27 19:35:22 2002 --- awt_Window.cpp Wed Nov 27 19:27:47 2002 *************** *** 73,79 **** return L"SunAwtWindow"; } ! void AwtWindow::FillClassInfo(WNDCLASS *lpwc) { AwtComponent::FillClassInfo(lpwc); /* --- 73,79 ---- return L"SunAwtWindow"; } ! void AwtWindow::FillClassInfo(void *lpwc) { AwtComponent::FillClassInfo(lpwc); /* *************** *** 82,88 **** * * lpwc->style |= CS_SAVEBITS; // improve pull-down menu performance */ ! lpwc->cbWndExtra = DLGWINDOWEXTRA; } --- 82,88 ---- * * lpwc->style |= CS_SAVEBITS; // improve pull-down menu performance */ ! ((WNDCLASS *)lpwc)->cbWndExtra = DLGWINDOWEXTRA; } ------- awt_Dialog.h ------- *** /tmp/sccs.5gaaxR Wed Nov 27 19:35:22 2002 --- awt_Dialog.h Wed Nov 27 19:22:29 2002 *************** *** 32,38 **** virtual const char* GetClassName(); virtual LPCWSTR GetClassNameW(); ! virtual void FillClassInfo(WNDCLASS *lpwc); virtual void SetResizable(BOOL isResizable); void Show(); --- 32,38 ---- virtual const char* GetClassName(); virtual LPCWSTR GetClassNameW(); ! virtual void FillClassInfo(void *lpwc); virtual void SetResizable(BOOL isResizable); void Show(); ------- awt_Dialog.cpp ------- *** /tmp/sccs.6gaaxR Wed Nov 27 19:35:22 2002 --- awt_Dialog.cpp Wed Nov 27 19:28:28 2002 *************** *** 56,65 **** return L"SunAwtDialog"; } ! void AwtDialog::FillClassInfo(WNDCLASS *lpwc) { AwtWindow::FillClassInfo(lpwc); ! lpwc->hIcon = NULL; // Dialog inherits icons from owner dinamically } /* --- 56,66 ---- return L"SunAwtDialog"; } ! void AwtDialog::FillClassInfo(void *lpwc) { AwtWindow::FillClassInfo(lpwc); ! // Dialog inherits icon from its owner dinamically ! ((WNDCLASS *)lpwc)->hIcon = NULL; } /* ###@###.###
11-06-2004