Hello.
I'm usin a JTextPane for a small editor I need.
I'm using it for it's ability to use HTML format codes (<font color = #color>string</font> for a singular line);
Now, It's loading lines from a text file. Then, I made a function to parse the array data into a singular string, and return it.
It's along the lines of
String parseArrayToString(String[] data) {
String returnString = "";
for(String s : data)
returnString += s+"\n";
return returnString;
}
This worked for JTextArea, but not for this.
Is there any way to do this using JTextPane?