jfilechooser

Pressing save button in JFileChooser opens a folder instead of saving a file

I'm having the following problem with a JFileChooser: I create a save dialog and then when I'm trying to save a file, I'm entering a file name into the field and click "Save". Suppose that the directory, which I try to save my file to, contains a subdirectory, which is named exactly like the entered name. In this case JFileChooser opens ...

How to get directory path using JFileChooser?

Hi, I have a small java GUI application with a text field on it. When the user clicks the text field an event is triggered and the JFileChooser is launched. It's restricted to directories only. What I'm trying to do is to get the full path of the directory that was chosen and put it in the text field. I have no idea how to do this, I...