简体   繁体   English

如何确定已选择哪个FileChooser ExtensionFilter-javafx

[英]How to determine which FileChooser ExtensionFilter has been selected - javafx

I having trouble related to javafx filechooser component. 我遇到与javafx filechooser组件有关的麻烦。 In filechooser javafx doesn't provide a way to get selected extension type(file extension selected in save as dropdown). 在filechooser中,javafx没有提供获取所选扩展名类型的方法(在“另存为”下拉列表中选择了文件扩展名)。 Same issue is also mentioned here . 这里也提到同样的问题。 It is fixed in javafx 8 version. 它在javafx 8版本中已修复。 see here .it requires login. 看到这里。它需要登录。 I am using javafx 2.2. 我正在使用javafx 2.2。 Can somebody suggest a workaround for same using javafx 2.2? 有人可以建议使用javafx 2.2的解决方法吗?

Thanks! 谢谢!

It seems to be already implemented &/ or fixed. 它似乎已经实施和/或修复。 If what you exactly want is still no working for you with the latest javaFx version, than i guess you should use poj or apache commons: 如果最新的javaFx版本仍然无法满足您的需求,那么我猜您应该使用poj或apache commons:

The apache Commons library has FilenameUtils.getExtension() or maybe: Java getting file extension without substring apache Commons库具有FilenameUtils.getExtension()或: Java获取没有子字符串的文件扩展名


声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM