I\'m trying to save a file using JFileChooser. However, I seem to be having some trouble with it. Here\'s my code:
JFileChooser
if (e.getSource() == saveMenu
You should try this. I did this and it worked.
FileOutputStream fileOut = new FileOutputStream(file1+".xml"); hwb.write(fileOut); fileOut.close(); System.out.println("\n Your file has been generated!"); JOptionPane.showMessageDialog(this,"File Created.");