fileDialog.setFilenameFilter(xxxxxx) not working under xp ?

Hi all,

I 'm having some problems using a filter under XP, my filter is being ignored :-(... here is a sample of my code.

FileDialog fileDialog = new FileDialog(new Frame(), "Select XML definition file");

// this fillter is being ignored

fileDialog.setFilenameFilter(new XMLFileFilter());

fileDialog.setMode(FileDialog.LOAD);

fileDialog.show();

.......

private class XMLFileFilter implements FilenameFilter

{

public boolean accept(File pDir, String pName) {

if(pName.toLowerCase().endsWith(".xml"))

return true;

else

return false;

}

}

Some hints will be appreciated thanks .

Nelson

[705 byte] By [Raidback] at [2007-9-30 20:50:04]
# 1
Hi there?What version of hte JDK are you using?Karianna
karianna at 2007-7-7 2:23:07 > top of Java-index,Administration Tools,Sun Connection...
# 2
Thank for taking your time to answer my post.Finally a filter was not necessary onlty settting the parttern " *.xml " to the filedialog resolved my problems....fileDialog.setFile("*.xml");...Nelson
Raidback at 2007-7-7 2:23:07 > top of Java-index,Administration Tools,Sun Connection...
# 3
The best problems are the ones you solve yourself :-), congrats!Karianna
karianna at 2007-7-7 2:23:07 > top of Java-index,Administration Tools,Sun Connection...