我想用JFileChooser
与LWJGL
但fileChooser.isDisplayable()
返回false,我检查,因为它不会弹出。使用JFileChooser与LWJGL
这是我在用,
private void chooseFile(){
choose = new JFileChooser();
choose.setCurrentDirectory(new File("."));
choose.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
choose.setFileFilter(new FileFilter(){
@Override
public boolean accept(File f) {
if(f.isDirectory()){
return true;
}
final String name = f.getName();
return name.endsWith(".png");
}
@Override
public String getDescription() {
return "*.png";
}
});
}
因此,如果任何人有经验,这或只是一般知道为什么它不应该不能或永远不会成功或什么都告诉我,这样我就可以继续我的生活,找到其他解决方案,或者如果有人知道如何解决它。
为了更快地获得更好的帮助,请发布[SSCCE](http://sscce.org/)。 *“感谢infront,rose。”*不包括sigs。在问题中。他们是噪音。 –