7

I'm trying to add the Preferences menu to my Java Swing application and it's proving a bit of a nause.

I have read many posts and articles on this and it sounds easy but...

I see references to com.apple.eawt.Application in the examples I have found but when I try to import it in Eclipse Indigo I get an error:
Access restriction: The type Application is not accessible due to restriction on required library /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/ui.jar

Any ideas?

I am working on an iMac OSX 10.6

Lyndon
  • 573
  • 6
  • 24
  • Please cite whichever of the "many posts and articles" you think may guide responders. – trashgod Dec 30 '11 at 14:51
  • Here's an example of an article about adding the 'Preferences Menu': http://www.devdaily.com/java/java-mac-osx-about-preferences-quit-application-adapter – Lyndon Dec 30 '11 at 14:57

1 Answers1

7

You might be able to use OSXAdapter, which "uses a reflection proxy model to hook existing preferences, about, and quit functionality." See also this answer.

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