I'm converting a C# windows forms application equivalent to a Java swing application and I'm stuck up at a position where I need to pass a window handle to C++ JNI layer.
In C++ layer, I've a function accepting void* pointer as window handle
ie
void SetWindowHandle(void* handle);
In C#, it is simply done as:
obj.SetWindowHandle(videoPanel.Handle);//videoPanel is System.Windows.Forms.Panel
In Java, I've created the UI with JPanel instead of Windows.Forms.Panel, but I've no idea how to get the handle for this JPanel.
Any idea, how it can be done? JFYI, this window handle is used in lower C++ layer as a handle for rendering video.