Java JFileChooser getAbsoluteFile Add File Extension
- by ikurtz
i have this issue working but i would like to know if there is a better way of adding the file extension?
what i am doing right now is:
String filePath = chooser.getSelectedFile().getAbsoluteFile() + ".html";
im adding the extension hard coded. and then saving to it.
just wondering if there is a more robust/logical manner this can be implemented?
thank you for your time.
EDIT: i ask this as i would like my app to be portable across platforms. so adding .html manually i may make this a windows only solution.