SWT怎么实现 在对话框里选择打开多个文件夹?? 求大侠相助:在SWT怎么实现 在对话框里选择打开多个文件夹??这里选择的是文件夹作为打开对象,还是多个。。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 JFileChooser 设置选择模式为多个,选择的类型为文件夹JFileChooser jfc = new JFileChooser();jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);jfc.setMultiSelectionEnabled(true); DirectoryDialog的能实现吗?JFileChooser 的风格就不一样了 怎么办呢?用DirectoryDialog可以实现吗?求达人。。 现在都使用Swing包下的类,建议用JFileChooser jfc = new JFileChooser(); jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); jfc.setMultiSelectionEnabled(true); FileDialog dialog = new FileDialog(shell, SWT.MULTI); dialog.setText(aTitle); if (0 < path.length()) { dialog.setFilterPath(path); } dialog.setFilterExtensions(aExtList); dialog.setFilterNames(aNameList); dialog.open(); path = dialog.getFilterPath(); String[] selNames = dialog.getFileNames(); for (int index = 0; index < selNames.length; index++) { selNames[index] = path + File.separator + selNames[index]; } return selNames; e...aExtList?文件的扩展名是啥哈? FileDialog f = new FileDialog(shell, SWT.MULIT); java考试系统 c/s 带程序题批改 深入浅出话反射——明明白白我的心[转] java,c++和c java or oracle 技术群 Double 高分求救:java无法运行程序 真诚提问未知问题 谢谢捧场 新的一年大家应该有新的学习计划!! applet读取数据库急救!! 媒体框架播放的问题 关于价格设为float型的问题,请帮帮忙 java如何画多边形???
jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
jfc.setMultiSelectionEnabled(true);
JFileChooser 的风格就不一样了
用DirectoryDialog可以实现吗?
求达人。。
JFileChooser jfc = new JFileChooser();
jfc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
jfc.setMultiSelectionEnabled(true);
dialog.setText(aTitle);
if (0 < path.length()) {
dialog.setFilterPath(path);
}
dialog.setFilterExtensions(aExtList);
dialog.setFilterNames(aNameList);
dialog.open();
path = dialog.getFilterPath();
String[] selNames = dialog.getFileNames();
for (int index = 0; index < selNames.length; index++) {
selNames[index] = path + File.separator + selNames[index];
}
return selNames;
aExtList?文件的扩展名是啥哈?