简体   繁体   中英

How to get the NSWindow * for a java Window

如果我有Java Window对象,最简单的方法是(可能是调用Mac专用的补充API,JNA或JNI)以获取与其对应的NSWindow *

I don't know if Apple still supports this anymore, but you should be able to get the " NSView " inside a window . And once you have that, you should be able to get the parent window:

import com.apple.eawt.CocoaComponent;

@Override
native public long createNSViewLong();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM