Added support for displaying text in window.