Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
JSheets
Last Revision: | Version 1.2, 2006-07-11 Updated compiler options to generate 1.4 compatible bytecode. (Full Revision History) |
Build Requirements: | Xcode 2.0 or later |
Runtime Requirements: | Mac OS X 10.4 or later, Java 1.4.2 or later |
This sample demonstrates a mechanism for displaying document-modal sheets, a feature specific to Mac OS X applications, inside a Java application. It uses the AWT Native Interface (JAWT) to obtain a JFrame's underlying NSWindow (Cocoa) peer, and displays an NSOpenPanel or NSSavePanel using the beginSheetForDirectory:... method. Note the combination of performSelectorOnMainThread and EventQueue.invokeLater to prevent threading problems when communicating between AppKit and AWT.
Copyright © 2006 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2006-07-11