I see.
That link was very helpful, thank you very much.
The article says that:
When a document is loaded, EndOfLineStringProperty is set appropriately, and when the document is written back out, the EndOfLineStringProperty is used. But while the document is in memory, the "\n" character is used to define a newline, regardless of how the newline is defined when the document is on disk.
So there is no way to change the behavior of the getText() method. I either use the document that is backing the JTextArea or I replace those strings myself.