Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java Swing Mac OSX Preferences Menu

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

like image 766
Lyndon Avatar asked Dec 30 '11 14:12

Lyndon


1 Answers

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.

like image 62
trashgod Avatar answered Sep 28 '22 06:09

trashgod