This sample utilizes a reflection Proxy model to connect existing preferences, about, and quit features to handlers for the Mac OS X application menu. This can be implemented by implementing the ApplicationListener interface, but this sample's dynamic implementation will only be triggered on platforms that support the Apple APIs (e.g. Java 1.4 or later on Mac OS X), avoiding any compatibility issues.