JFrame minimized to dock name “java”

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:06:01

问题


I am displaying a JFrame on OS X and am getting "java" for the name of the application when it is minimized to the dock. I am passing -Xdock:name="Foo", and this is changing the name in the dock when the application is not minimized, but once we minimize the name in the dock is wrong.

To minimize I am calling setExtendedState(JFrame.ICONIFIED).


回答1:


To get this effect on Mac OS X, you'll need to add the option to your application bundle's Info.plist, as shown in the example cited here.

<key>VMOptions</key>
<string>-Xdock:name=Foo</string>


来源:https://stackoverflow.com/questions/21591491/jframe-minimized-to-dock-name-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!