这个不可以实现吧?你觉得Excel能实现这个 功能吗?

解决方案 »

  1.   

    没有那样做过,但感觉那样不是太好。我觉得你可以在用户选择文件,并点了FileCHooser的确定以后,判断文件的路径,如果不是你那个文件夹里的路径,那么继续返回,让用户选。
      

  2.   

    CoolAbu的想法值得考虑一下,谢谢!
    jiaminxy我不知道你为什么提Excel?
      

  3.   

    JFileChooser chooser = new JFileChooser();
            chooser.setFileFilter(new FileFilter(){
                public boolean accept(File f){                 //这里写上你想要得路径
                    if (f.getPath().toLowerCase().startsWith("d:\\excel"))
                        return true;
                    else
                        return false;
                }            /**
                 * The description of this filter. For example: "JPG and GIF Images"
                 * @see FileView#getName
                 */
                public String getDescription(){
                    return "";
                }
            });
      

  4.   

    maowu(猫呜) 的方法不错,顶