void AwtScrollPane::_SetSpans(void *param)
{
    JNIEnv *env = (JNIEnv *)JNU_GetEnv(jvm, JNI_VERSION_1_2);

    SetSpansStruct *sss = (SetSpansStruct *)param;
    jobject self = sss->scrollpane;
    jint parentWidth = sss->parentWidth;
    jint parentHeight = sss->parentHeight;
    jint childWidth = sss->childWidth;
    jint childHeight = sss->childHeight;

    AwtScrollPane *s = NULL;

    PDATA pData;
    JNI_CHECK_PEER_GOTO(self, ret);
    s = (AwtScrollPane *)pData;
    if (::IsWindow(s->GetHWnd()))
    {
        DTRACE_PRINTLN5("%x: WScrollPanePeer.setSpans(%d, %d, %d, %d)", self,
            parentWidth, parentHeight, childWidth, childHeight);
        s->RecalcSizes(parentWidth, parentHeight, childWidth, childHeight);
        s->VerifyState();
    }
ret:
   env->DeleteGlobalRef(self);

   delete sss;
}
/*
 * Class:     sun_awt_windows_WScrollPanePeer
 * Method:    setSpans
 * Signature: (IIII)V
 */
JNIEXPORT void JNICALL
Java_sun_awt_windows_WScrollPanePeer_setSpans(JNIEnv *env, jobject self,
					      jint parentWidth,
					      jint parentHeight, 
					      jint childWidth,
					      jint childHeight)
{
    TRY;

    DTRACE_PRINTLN5("%x: WScrollPanePeer.setSpans(%d, %d, %d, %d)", self, 
               parentWidth, parentHeight, childWidth, childHeight);
    PDATA pData;
    JNI_CHECK_PEER_RETURN(self);
    AwtScrollPane* pane = (AwtScrollPane *)pData;
    pane->RecalcSizes(parentWidth, parentHeight, childWidth, childHeight);
    pane->VerifyState();

    CATCH_BAD_ALLOC;
}