Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to take Peer window ID in Mac OS?

843807Aug 12 2010
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.

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 9 2010
Added on Aug 12 2010
0 comments
949 views