This site is currently read-only as we are migrating to Oracle Forums for an improved community experience. You will not be able to initiate activity until January 31st, when you will be able to use this site as normal.

    Forum Stats

  • 3,890,899 Users
  • 2,269,649 Discussions
  • 7,916,821 Comments

Discussions

How to take Peer window ID in Mac OS?

Hi,

I have to take native peer window Id in Mac OS using Java.

For Linux, I know we can do it as below.

Class cl = Class.forName("sun.awt.X11ComponentPeer");
java.lang.reflect.Method m = cl.getMethod("getContentWindow", null);
Object obj = m.invoke(comp.getPeer());
long windowId = Long.parseLong(obj.toString());

Since there is awt package on Mac Java, I don't know how to take window ID.
If anybody has experience on this please help me.
This discussion has been closed.