Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
767 views
in Technique[技术] by (71.8m points)

java - When running the program in netBeans the font looks extremely weird

so I set up netBeans and a SceneBuilder on my new MacBook M1 and everything works, except of the font when running the program.

It looks like this:

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

and I have no clue why. The Button should say: "Click me" and the Label: "Hello".

The Error message I get is:

M?rz 31, 2021 6:33:04 PM javafx.fxml.FXMLLoader$ValueElement processValue
WARNING: Loading FXML document with JavaFX API of version 16 by JavaFX runtime of version 11.0.2
2021-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:].
2021-03-31 18:33:05.466 java[4349:140717] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
2021-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:].
2021-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:].


I really hope you can help me. Thank you!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I also had the same issue, but in my case, the problem was with JDK 11. First, I tried to switch to JDK 8 and everything worked fine, but then I found that another version of JDK 11 (AdoptOpenJDK(HotSpot) 11) also fixes it.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...