java - Using JFileChooser with LWJGL -


i trying use jfilechooser lwjgl filechooser.isdisplayable() returns false, checked because wouldn't pop up.

this using,

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";         }      }); } 

so if has experience or knows why shouldn't couldn't or never work or ever tell me, can go on life , find other solution, or fix if knows how to.

you never tell jfilechooser open dialog. need call filechooser.showopendialog() or 1 of other dialog methods (can open/save/etc.).

here simple example.


Comments

Popular posts from this blog

curl - PHP fsockopen help required -

HTTP/1.0 407 Proxy Authentication Required PHP -

c# - Resource not found error -