Adding automatic word wrapping.

Added automatic wrapping if the line length exceeds the width of the box.