Sunday 15 February 2015

user interface - java filechooser -


I am working on a project, in Java, where to select a file to upload the user through jfilechooser Will be. Is there any way to make the text file read-only so that you can not select by simply clicking on the file, and typing in the text field. I hope I have clarified my problem, D

If your intention is to ensure that That the user has selected a file instead of the directory (your answer to other answers), you can use the FileChooser.setFileSelectionMode (JFileChooser.FILES_ONLY); However, this is the basic setting when you instantiate the file selector, so unless your code changes at some point, you should not have to set it explicitly.

Enjoy your viewing:


No comments:

Post a Comment