Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java thread: JFileChooser Help


Message #1 by dbayo66@h... on Fri, 10 Aug 2001 15:24:05
hello all,

I have to write read (xml files) and write (xml files) services for my 
current project, while I think i have done a good job, I found some things 
odd, and I am wondering if anyone else has any ideas

1.  Hard to default a file name when using SaveDialog, i used this code:

public boolean WriteXML(Component comp, Document doc,String fileName){

try {
      File file = new File(fileName);
      JFileChooser fc = new JFileChooser();
      fc.setSelectedFile(file);

but when the user changed directories the filename is gone.  The filename 
should stay there when the user is navigating through directories picking 
a place to save.

2.  File filters,I used Jbuilder 3.0 some time back and simply set what 
files in the attribute inspector, now I have to implement a class to do it.

I know I am whining :-)

Anyhow if anyone knows a site with good JFileChooser examples PLEASE send 
me the link.

Thanks,

Rob

  Return to Index