swing - How can I get the file path of a file saved by the user in my program in Java? -


i creating program applies filter image , afterwards gives user option of darkening image or making lighter. before image filtered user picks save location new image. there anyway can filepath of location choose save to? using jfilechooser accomplish this.

jfilechooser#getselectedfile returns java.io.file of selected file (or null if didn't pick something).

have @ how use file choosers more details

you use file#getparentfile return path element (without file name) of file object if want path, otherwise have abstract representation of file user selected...


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -