SolveErrors
Swing / AWT / SWT

Save button within JFrame not working

11 views

Hi all,

Firstly, apologies if I have posted this in the wrong section however i think my problem is more relevant to Swing rather than XML.

I have a programme that when a button is selected on the main JFrame, an XML file is loaded into memory and a document / object created; this works fine.

I then pass this XML document / object as a parameter to a constructor onto another JFrame to be used within this second JFrame; again this works fine.

However, my problem lies when i try and save this object by using a save button i have created on the second JFrame; when i press the save button, i get a blank XML document i.e. the initial document hasnt saved.


Here is the code for the first button on the first JFrame which loads the XML file and creates an object: