如何在Javafx2中选择多个文件夹和文件? [英] How to select multiple folders and files in Javafx2?

查看:103
本文介绍了如何在Javafx2中选择多个文件夹和文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 javafx 2。,但 filechooser 上没有多个文件夹和文件的功能。

I am working on javafx 2. but there is no feature of multiple folders and files available on the filechooser.

目录选择器但它只选择一个文件夹。我怎么解决这个问题。请给我任何建议?

There is the Directory chooser but it selects only one folder. How can i solve this problem. Please give me any suggestion?

推荐答案

我们可以使用Swing组件的JFileChooer。但后来它给出了像无头的东西的错误。因此,请按照以下步骤删除此错误。

We can use JFileChooer of Swing component. But then its give error like Headless something. So remove this error by following steps.

1)在javafx之前初始化swing的所有组件。
2)使用System.setProperty并设置Headless false。

1) Initialised all component of swing before javafx. 2) use System.setProperty and set Headless false .

然后jfilechooser工作。谢谢大家。

Then jfilechooser works. Thanks to all.

这篇关于如何在Javafx2中选择多个文件夹和文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆