在 netBeans 中运行程序时,字体看起来非常奇怪

4 java fonts netbeans scenebuilder

我在我的新 MacBook M1 上设置了 netBeans 和 SceneBuilder,除了运行程序时的字体外,一切正常。

\n

它看起来像这样:

\n

https://i.stack.imgur.com/8Yads.png

\n

我不知道为什么。\n按钮应该显示:“Click me”,标签:“Hello”。

\n

我收到的错误消息是:

\n
M\xc3\xa4rz 31, 2021 6:33:04 PM javafx.fxml.FXMLLoader$ValueElement processValue\nWARNING: Loading FXML document with JavaFX API of version 16 by JavaFX runtime of version 11.0.2\n2021-03-31 18:33:05.466 java[4349:140717] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].\n2021-03-31 18:33:05.466 java[4349:140717] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.\n2021-03-31 18:33:05.471 java[4349:140717] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].\n2021-03-31 18:33:05.641 java[4349:140751] CoreText note: Client requested name ".SFNS-Regular", it will get Times-Roman rather than the intended font. All system UI font access should be through proper APIs such as CTFontCreateUIFontForLanguage() or +[NSFont systemFontOfSize:].\n
Run Code Online (Sandbox Code Playgroud)\n

小智 5

我也遇到了同样的问题,但就我而言,问题出在 JDK 11 上。首先,我尝试切换到 JDK 8,一切正常,但后来我发现另一个版本的 JDK 11 (AdoptOpenJDK(HotSpot) 11)也修复它。