public String chooseFilenameToSave(String defaultFilename) {
    chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    String result = (defaultFilename == null) ? chooseFilename() : chooseFilename(defaultFilename);
    chooser.setDialogType(JFileChooser.OPEN_DIALOG);

    return result;
  }
public String chooseFilenameToSave(String defaultFilename) {
    chooser.setDialogType(JFileChooser.SAVE_DIALOG);
    String result = (defaultFilename == null) ? chooseFilename() : chooseFilename(defaultFilename);
    chooser.setDialogType(JFileChooser.OPEN_DIALOG);

    return result;
  }
public String chooseFilenameToSave ( String defaultFilename ) { chooser . setDialogType ( JFileChooser . SAVE_DIALOG ) ; String result = ( defaultFilename == null ) ? chooseFilename ( ) : chooseFilename ( defaultFilename ) ; chooser . setDialogType ( JFileChooser . OPEN_DIALOG ) ; return result ; }
/* public java.io.File chooseFile() {
if (!readOk) return null;
w.show();

if (chooser.showOpenDialog( parent) == JFileChooser.APPROVE_OPTION) {
File file = chooser.getSelectedFile();
if (debug) System.out.println("FileManager result "+file.getPath());
if (file != null)
return file;
}
return null;
}
/ * public java . io . File chooseFile () { if ( !readOk ) return null ; w . show () ;