Sorry for the vague question, but: If I had some text in a jTextArea, which contained some code (java, for example), how would I be able to convert that into a value which could then be used as a string, eg " would become \"?
E.g. I get the below result:
String a = "helloworld";
And put it back into the jTextArea with this result:
"String a = \"helloworld\";"
Note: the jTextArea.getText(); method does not return the correct result