Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: FileDialog vs JFileChooser



First, I did not write the dialog code in our app, I inherited it, so I don't know what the original thinking was. 

As far as I am concerned, it seems a FileDialog is perfectly adequate for our needs, assuming I can use FileFilters and set the default directory in the same way (I assume I can, but have not tried it yet).

One of the other guys responding to this thread mentions multiple file selection as an advantage to the JFileChooser, but I am willing to forgo that to get the Aqua look.

Thanks,
Paul

On May 23, 2006, at 12:24 PM, Mike Swingler wrote:

The FileDialog is designed to be a straight pass-though to the native operating system's Open/Save dialog, whereas the JFileChooser is implemented in pure Swing, allowing it to be embedded in other Swing components.

It's not necessarily the case that the JFileChooser is better than the FileDialog because it's newer, they are simply two different implementations with very different design intentions and constraints.

Generally we steer folks towards the FileDialog, even in Swing applications, assuming they want something as close to the native platform's look as possible. Is there additional functionality you use with JFileChoosers that you notice missing with the FileDialog?

Thanks,
Mike Swingler
Java Frameworks Engineer

On May 23, 2006, at 11:04 AM, Paul Archibald wrote:

Our app is currently using JFileChooser(s) for save and open dialogs. However, it used to have a FileDialog for certain situations (save as on the Mac only). That looked better than the JFileChooser on the Macintosh, as it was more Aqua(tic? ish?), having the standard system file chooser look with the sidebar and column/icon views.

Has anyone noticed this? It seems odd that Apple would implement the older, AWT component FileDialog in a more modern way than the newer, Swing JFileChooser. 


Paul Archibald

A great deal of intelligence can be invested in ignorance when the need for illusion is deep.
 -- Saul Bellow


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden

References: 
 >FileDialog vs JFileChooser (From: Paul Archibald <email@hidden>)
 >Re: FileDialog vs JFileChooser (From: Mike Swingler <email@hidden>)



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.