你是不是想作成象window里面的保存,选择文件的对话框吗,你可以用FileDialog类来实现
public FileDialog(Frame parent,
                  String title,
                  int mode)
Creates a file dialog window with the specified title for loading or saving a file. 
If the value of mode is LOAD, then the file dialog is finding a file to read, and the files shown are those in the current directory. If the value of mode is SAVE, the file dialog is finding a place to write a file.