ApplicationListener class in Apple's Java is deprecated. What is the alternative?
package: com.apple.eawt
Please migrate to using the com.apple.eawt.Application.set*Handler() APIs if you want to hook into Open, Preferences, About, Quit menu items / events.
The full response is
As the deprecator of these APIs, I think I'm qualified to answer this:
Please migrate to using the com.apple.eawt.Application.set*Handler() APIs if you want to hook into Open, Preferences, About, Quit menu items / events. The full JavaDocs are in the appledocs.jar in the Java Developer Package's JDK at <developer.apple.com/downloads/index.action?name=Java Developer>, as well as a somewhat staler copy at [ ... broken link ...].
Most people usually just want to implement the setQuitHandler() or use setQuitStrategy(), and maybe want setPreferencesHandler(). The old style ApplicationListener was a terrible interface, because it cross cut too many disparate concepts and forced an application to listen to all of them, and allowed multiple listeners to be notified about things that should only be handled by a single agent.
Regards, Mike Swingler Java Engineering