Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

macos - Any workaround for Java/Swing bug under Mac OS when opening new windows as tabs

I'm developing a swing based Java application (Java 8) for Mac and Windows. Some users have set the mac system preference under "General" "Prefer Tabs when opening documents" to "Always" or "Full screen". When the setting is set to "Never" it works without problems.

enter image description here

This setting causes some weird state in which the window opens a new tab which results in a frozen application which can only be force quitted. I cannot assume that users know about this hidden setting in the Mac OS system preferences.

enter image description here

Three solutions would work for me:

  • Find any workaround to prevent the window from opening other windows as tabs?
  • Launching our bundled Java app with some -flag that disables this behaviour for the entire application
  • Detecting if this mac system setting is enabled and then warn the user and quit the application (not really a good solution)

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

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...