< prev index next >

src/java.desktop/windows/native/libawt/windows/awt_Dialog.cpp

Print this page

        

@@ -98,11 +98,10 @@
  */
 AwtDialog* AwtDialog::Create(jobject peer, jobject parent)
 {
     JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);
 
-    jobject background = NULL;
     jobject target = NULL;
     AwtDialog* dialog = NULL;
 
     try {
         if (env->EnsureLocalCapacity(2) < 0) {

@@ -179,26 +178,17 @@
                 dialog->m_hIconSm = awtParent->GetHIconSm();
                 dialog->m_iconInherited = TRUE;
             }
             dialog->DoUpdateIcon();
 
-
-            background = env->GetObjectField(target,
-                                             AwtComponent::backgroundID);
-            if (background == NULL) {
-                JNU_CallMethodByName(env, NULL,
-                                     peer, "setDefaultColor", "()V");
-            }
         }
     } catch (...) {
-        env->DeleteLocalRef(background);
         env->DeleteLocalRef(target);
         throw;
     }
 
 done:
-    env->DeleteLocalRef(background);
     env->DeleteLocalRef(target);
 
     return dialog;
 }
 
< prev index next >