I am not too clear about what you are trying to do here ?
i. You want to have a Panel and then display some text on it.
ii. You then want to save this panel to a text file ?
What do you mean by insert the panel in a text file ?
Sorry for the confusion...