参数是作为JFileChoose的父窗体。可能因为你没用装ie插件!JFileChoose是swing的类,ie里的jdk太老了!

解决方案 »

  1.   

    在IE里要用swing的類,要安裝JRE
      

  2.   

    private JPanel contentPane = (JPanel) this.getContentPane();
    BtnBrow2.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent e) {
                    int returnVal = fc.showOpenDialog(contentPane);
                    if (returnVal == JFileChooser.APPROVE_OPTION) {
                        File file = fc.getSelectedFile();
                        txtFilepath.setText(file.getPath());
                    }
                }
            });