Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the alternative to using the now deprecated com.apple.eawt.ApplicationAdapter in Java Swing apps on the Mac?

Tags:

java

macos

swing

Looks like apple has deprecated an api my app is using. Not sure how to work around this. The specific usage can be seen here:

http://code.google.com/p/jarzilla/source/browse/trunk/jarzilla/src/main/java/com/googlecode/jarzilla/Jarzilla.java#192

like image 929
depsypher Avatar asked Feb 26 '11 22:02

depsypher


1 Answers

OK, a bit of googling got me the API doc (second hit for me), and it contains right in the first sentence:

Deprecated. replaced by AboutHandler, PreferencesHandler, AppReOpenedListener, OpenFilesHandler, PrintFilesHandler, QuitHandler, QuitResponse.

(with links to the interfaces and class in mentioned).

So it looks like you should not use one object subclassing this abstract class, but several objects for the different purposes, and register them each with your Application object.

like image 145
Paŭlo Ebermann Avatar answered Sep 19 '22 02:09

Paŭlo Ebermann