addChoosableFileFilter(),setFileFilter() 里面都要带一个 FileFilter 类,但 记住,
FileFilter 是抽象类,所以你不能创建该类的实例啊!!

解决方案 »

  1.   

    如下所示,
    addChoosableFileFilter(new FileFilter(){
          public boolean accept(File f) { return true; }
          public String description() { return ""; }
      }
    );
      

  2.   

    我的程序如下
    JFileChooser jfc=new JFileChooser();
    jfc.addChoosableFileFilter(new myFileFilter());
    仅此就出错;
    myFileFilter extends FileFilter
      

  3.   

    JFileChooser的问题已经解决,是我写的myFileFilter类继承错误,但PreparedStatement的setBinaryStream()方法使用仍然出错,提示为,setBinaryStream() cannot be applied at line **
      

  4.   

    setBinaryStream方法要带参数的,我用过很多次了,没有什么问题的。
    setBinaryStream(int parameterIndex, InputStream x, int length) 
              Sets the designated parameter to the given input stream, which will have the specified number of bytes.
      

  5.   

    能给我一个例子吗,我看一看与我的有什么不同
     pstm=con.prepareStatement("insert into doc values(?,?,?)");
            pstm.setString(1,fileName);
            pstm.setString(2,fileType);
            pstm.setBinaryStream(3,fin,fileLength);
    fin为FileInputStream
    写的很简单的,应该没错误呀