在Mac上的Java Swing应用程序中使用现已弃用的com.apple.eawt.ApplicationAdapter的替代方法是什么? [英] What's the alternative to using the now deprecated com.apple.eawt.ApplicationAdapter in Java Swing apps on the Mac?
问题描述
看起来苹果已经弃用了我的应用正在使用的API。不知道如何解决这个问题。具体用法如下:
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:
推荐答案
好的,谷歌搜索了一下我 API doc (第二次点击对我而言,它包含在第一句中的权利:
OK, a bit of googling got me the API doc (second hit for me), and it contains right in the first sentence:
已弃用。 被AboutHandler取代,PreferencesHandler,AppReOpenedListener,OpenFilesHandler,PrintFilesHandler,QuitHandler,QuitResponse。
(带有上述接口和类的链接) )。
(with links to the interfaces and class in mentioned).
所以看起来你不应该使用一个对象继承这个abstrac t class,但有几个对象用于不同的目的,并使用Application对象注册它们。
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.
这篇关于在Mac上的Java Swing应用程序中使用现已弃用的com.apple.eawt.ApplicationAdapter的替代方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!