简体   繁体   中英

Mac OS FullScreenUtility with JavaFX

So, I want to disable the Mac OS fullscreen option (the maximize button doubles as both fullscreen and maximize), and I found a way to edit it, take a look:

com.apple.eawt.FullScreenUtilities.setWindowCanFullScreen(Window, boolean);

Problem is, the method requires that I input an AWT Window. I was wondering if any of you guys know ways to use JavaFX windows with this? Or perhaps a method to get an AWT Window from a JavaFX Stage/Scene/Window?

Thanks in advance!

您是否尝试过添加动作监听器,就像

stage.fullScreenProperty().addListener((observable, oldValue, newValue) -> stage.setFullScreen(false));

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