我试图用这段代码来做到这一点:
JFileChooser chooser = new JFileChooser();
int retval = JFileChooser.CANCEL_OPTION;
chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY);
retval = chooser.showDialog(null, "Select");
但它没有用。控制台只是等待输入...
我试图用这段代码来做到这一点:
JFileChooser chooser = new JFileChooser();
int retval = JFileChooser.CANCEL_OPTION;
chooser.setFileSelectionMode( JFileChooser.DIRECTORIES_ONLY);
retval = chooser.showDialog(null, "Select");
但它没有用。控制台只是等待输入...