Originally posted by Michelle Wang:
But I have no idea how to do it,
Can Guru help here??
I don't know, why don't you ask
him?
(Sorry, couldn't hold back

)
You only need to save and load the lines right? As in the contents of "List lines"?
If so it shouldn't be that hard.
Step 1: create your XML layout.
I'd go for the following:
Because that's what a line is: a start point and an end point, and each point has an X and Y coordinate.
Step 2: saving to XML. This is quite easy. Get a FileWriter, wrap it in a PrintWriter, and write everything:
Step 3: reading from XML. I'd use a library like JDOM. You let it parse the XML, and you read the elements. In pseudo code:
I'm sure you can fill in the blanks.
But if it were up to me, I'd serialize and deserialize the entire List of lines. It would be a lot easier, and you prevent someone opening your XML file with a text editor and messing it up.