1

I want to customize the "About" dialog box that OSX displays for my Swing application.

When OSX runs a Swing application, it displays a menu on the menu bar named after the main class being run. To customize this behavior, and display the application's name, the following seems to be the usual course of action:

System.setProperty("com.apple.mrj.application.apple.menu.about.name", "My Swing App");

This approach works. When you then select "My Swing App" > "About My Swing App" from the menu, an About dialog appears. Unfortunately, the About dialog looks hideous. It contains a default icon, and a version number. The version number is always 1.0.

How do I change the version number? How do I change the text? How do I change the icon? Where did the first person who used this strategy find instructions on using "com.apple.mrj.application.apple.menu.about.name"? Is there a list somewhere of other properties I can use?

Daniel
  • 10,115
  • 3
  • 44
  • 62

1 Answers1

3

You can implement the menu using OSXAdapter. It will get the version number from your Info.plist, as shown in this example.

Addendum: Is there a list somewhere of other properties I can use?

Yes, About Info.plist Keys is fairly recent; CFBundleVersion is the one required.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045