src/windows/native/sun/windows/awt_Component.cpp
Print this page
*** 490,500 ****
--- 490,505 ----
* The window class of multifont label must be "BUTTON" because
* "STATIC" class can't get WM_DRAWITEM message, and m_peerObject
* member is referred in the GetClassName method of AwtLabel class.
* So m_peerObject member must be set here.
*/
+ if (m_peerObject == NULL) {
m_peerObject = env->NewGlobalRef(peer);
+ }
+
+ DASSERT (env->IsSameObject(m_peerObject, peer));
+
RegisterClass();
jobject target = env->GetObjectField(peer, AwtObject::targetID);
jboolean visible = env->GetBooleanField(target, AwtComponent::visibleID);
m_visible = visible;