问题
Okay. I have a gui with a title called "My Java Application". When I minimize it to my doc and hover over the icon, it just says "java", not "My Java Application". How would I fix that?
P.S. I am using a Macintosh computer.
回答1:
There's apparently a command line option for this on the Mac:
-Xdock:name="YourNameHere"
There's also some more information here:
- Programatically setting the dock:name Java Mac OS X JVM property
- Native Swing Menu Bar Support For MacOS X In Java
回答2:
Close the app if it's running
Open the app location in Finder. Right click icon in Doc - Choose Options/Show in Finder.
Right click the App and rename to the new name
Remove the app from the doc. Right click icon in Doc, Options/Remove from Doc
Click on the app to launch from the finder window.
- The new app icon when launched - will have the new name as the hover text
- Right click the app icon, choose Options and Select Keep in Doc. Position the icon to your convenient location
- Close the app and mouse over the icon and watch the new name appearing as hover text
来源:https://stackoverflow.com/questions/7178252/how-would-i-go-about-changing-the-hover-text-over-icon-in-doc-java