I was hoping to retrieve the newline character at the end of the text in a `JTextField`, however after setting the text field's text to my string, it has been modified to be a space character. The code below highlights the problem. 

Is it possible to preserve the `\n` in the text field?

```
import javax.swing.JTextField;

public class StackOver {
    public static void main(String[] args) {
        String hasNewLineEscapeCharacter = makeStringWithNewLineCharacter();
        JTextField backgroundText = new JTextField(90);
        backgroundText.setText(hasNewLineEscapeCharacter);
        char spaceChar = backgroundText.getText().charAt(backgroundText.getText().length()-1);
        char newLineChar = hasNewLineEscapeCharacter.charAt(needsNewLineEscapeCharacter.length()-1);
    }

    public static String makeStringWithNewLineCharacter() {
        String str = "hello,world!";
        str += ('\n');
        return str;
    }       
}

```