| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
Alexandre Aybes <email@hidden> wrote:_______________________________________________
I am trying to get a Folder Chooser preferably using the AWT file
chooser because the Swing File Chooser is just horrible. Is there any
hidden option to get the AWT FileChooser to select only folders?
Yes. Set the system property apple.awt.fileDialogForDirectories to true just
before showing the dialog, and then reset it.
FileDialog d = new FileDialog(parent, title, FileDialog.LOAD);
String prop = "apple.awt.fileDialogForDirectories";
System.setProperty(prop, "true");
d.show();
System.setProperty(prop, "false");
Personally I subclassed FileDialog and do the gymnastic above in the overriden
show() method.
Steve
--
Steve Roy <email@hidden>
Personal homepage: <http://homepage.mac.com/sroy>
Projects homepage: <http://www.roydesign.net>
_______________________________________________
java-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/java-dev
Be sure to read the FAQ http://developer.apple.com/java/faq/ before posting
Do not post admin requests to the list. They will be ignored.
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.