且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Mac上的Java Swing应用程序中使用现已弃用的com.apple.eawt.ApplicationAdapter的替代方法是什么?

更新时间:2023-12-03 18:07:16

好的,谷歌搜索了一下我 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.