简体   繁体   中英

Change the Title on a Java Swing App

How would I go about changing the Title (in the menu bar) of my java app. When it is launched, at least in mac (My primary development environment), it displays the full class name instead of the title. I am using Swing as my GUI maker, and the this.setTitle("JeopardMe"); only makes the Title Bar change. I want to change the display in the menu bar.

I would have posted screenshots here, but apparently needing 10 reputation to post images and having 10 reputation is not allowed

I think I need to change the way the system looks at the program overall, because in the force quit window, (A Mac's rough equivalent to Task Manager), is Displays the class name, and I'm not sure that changing the menu bar would also change the force quit text. Any way to change the program's overall identity?

When you call the application from the command line add the following argument:

-Xdock:name=AppName

where AppName is the title you want to see.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM