0

I have a small question. I am using a JFileChooser in one of my projects and I want to make it so that I cannot edit the file name. Is there any way to do this?

3
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by JamesCherrill
0

Maybe set a FileFilter that only accepts the file name you want. (ps Why do yiou want to use a filechooser and not allow the user to specify the file name???)

0

oh i think you misinterpreted my question. you know how if you click on a file, and then click it again after a while, you are presented with an opportunity to edit the name of the file? I dont want to do that.

0

I cannot find such option in API. If I'm correct you will achieve this only with your custom build JFileChooser. Is it worth to do it?

0

ya i looked through the api as well and could not find a method. Could i perhaps add some sort of listener for clicks and then override a method?

0

oh i think you misinterpreted my question. you know how if you click on a file, and then click it again after a while, you are presented with an opportunity to edit the name of the file? I dont want to do that.

Sorry, I misunderstood.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.