Well, here’s what SWT does on MacOSX-Carbon:
JNIEXPORT jint JNICALL Java_org_eclipse_swt_internal_carbon_OS_CreateNewWindow
(JNIEnv *env, jclass that, jint arg0, jint arg1, jobject arg2, jintArray arg3)
{
Rect _arg2, *lparg2=NULL;
jint *lparg3=NULL;
jint rc;
DEBUG_CALL("CreateNewWindow\n")
if (arg2) lparg2 = getRectFields(env, arg2, &_arg2);
if (arg3) lparg3 = (*env)->GetIntArrayElements(env, arg3, NULL);
rc = (jint)CreateNewWindow((WindowClass)arg0, (WindowAttributes)arg1, (const Rect *)lparg2, (WindowRef *)lparg3);
if (arg2) setRectFields(env, arg2, lparg2);
if (arg3) (*env)->ReleaseIntArrayElements(env, arg3, lparg3, 0);
return rc;
}
CreateNewWindow appears to be documented here:
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/wind_mgr_ref/function_group_6.html#//apple_ref/c/func/CreateNewWindow
And useful links from there (sorry for the long links) are “Window Attribute Constants”:
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/wind_mgr_ref/constant_1.html#//apple_ref/doc/uid/TP30000176/C006478
and “Window Attributes”:
http://developer.apple.com/documentation/Carbon/Reference/Window_Manager/wind_mgr_ref/constant_2.html#//apple_ref/doc/uid/TP30000176/C015461
Are you passing the right flags to the CreateNewWindow function?
If you get no joy from any of that, you might want to look at how wxWindows does it: