Hi, Hendrik,

as far as I remember, AWT team investigated the new file dialog, when Vista was released. It looks fine, but there's an issue: it doesn't provide a way to implement

FileDialog.setFilenameFilter(FilenameFilter filter)

method. The chances are Microsoft has introduced new APIs for it since then, otherwise this method should be protected with a "isSupported" check.

Thanks,

Artem

On 3/7/16 7:35 PM, Hendrik Schreiber wrote:
Hey there,

as far as I can tell, the Windows AWT FileDialog still uses the Win32 Common 
File Dialog (see awt_FileDialog.cpp), which has existed seemingly forever.

Since we don’t support older Windows versions anymore in JDK9, wouldn’t it make 
sense to update the AWT FileDialog implementation to use the newer
"Common Item Dialog” 
(https://msdn.microsoft.com/en-us/library/windows/desktop/bb776913(v=vs.85).aspx)?

Common Item Dialog was introduced in Vista and therefore should be available on 
all targeted Windows versions (please correct me if I’m wrong). This would 
allow users to easily access a good-looking file dialog. Perhaps even fix HiDPI 
issues for free along the way.

The current AWT FileDialog looks like it’s from the last century (I guess it 
is). An update would be much appreciated.

I’d be happy to file a corresponding bug report, but figured it makes sense to 
float the idea here first.

Cheers,

-hendrik

Reply via email to