What type is the display variable?
Are you saying that the object display refers to does NOT recognize the \n character as a command to move the text following the \n to the next line?