要求是;
1.JDK环境为1.3,1.5的不用说了。
2.认为是JFileChooser的也不用说了。
3.欢迎提供讲解Java的shell API函数操作技术。
大家快快解答拿高分。

解决方案 »

  1.   

    Windows API SHBrowseforFolder or www.jgoodies.com/freeware/jdiskreport/
      

  2.   

    看下JDIC,JDK1.5的功能也是调用这个的
      

  3.   

    java.awt.FileDialog
    从jdk1.0开始就支持了
      

  4.   

    FileDialog(Frame f,String label,int mode);mode:
    FileDialog.LOAD // 打开文件对话框
    FileDialog.SAVE //保存文件对话框
      

  5.   

    Windows API SHBrowseforFolder
    这个好像可以。
      

  6.   

    JNI不是可以调用window 的api吗?
      

  7.   

    不知道这个行不行,我在eclipse论坛上发的swt的帖子
    public class FileUpLoad {
     public static void main(String[] args) {
      Display display = Display.getDefault();
      final Shell shell = new Shell();
      final GridLayout gridLayout = new GridLayout();
      gridLayout.numColumns = 2;
      shell.setLayout(gridLayout);
      shell.setSize(500, 375);
      shell.setText("SWT Application");
      shell.open();
      Label label = new Label(shell, SWT.NONE);
      label.setText("上传下载例子");  Text text = new Text(shell, SWT.BORDER);
      text.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false));
      Button button = new Button(shell, SWT.PUSH);
      button.addSelectionListener(new SelectionAdapter() {
       public void widgetSelected(SelectionEvent e) {
        FileDialog f = new FileDialog(shell);
        f.setFilterPath("%SYSTEMDRIVE%\\Documents and Settings\\All Users\\桌面");
        String path = f.open();
        if(path!=null){
         text.setText(path);
         } 
       }
      });
      button.setText("浏览");
     
      shell.layout();
      while (!shell.isDisposed()) {
       if (!display.readAndDispatch())
        display.sleep();
      }
     }
    }